You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2019/03/14 20:05:32 UTC
[qpid-proton] 03/06: PROTON-2004: [c] Allow Proton to compile with
libressl
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit 87898b3d71aea5bfd9e4157d6da04071e1461339
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Mon Mar 4 13:49:53 2019 -0500
PROTON-2004: [c] Allow Proton to compile with libressl
---
c/src/ssl/openssl.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/c/src/ssl/openssl.c b/c/src/ssl/openssl.c
index c791b73..89cc1aa 100644
--- a/c/src/ssl/openssl.c
+++ b/c/src/ssl/openssl.c
@@ -74,7 +74,7 @@ struct pn_ssl_domain_t {
char *ciphers;
int ref_count;
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#ifdef SSL_SECOP_PEER
int default_seclevel;
#endif
pn_ssl_mode_t mode;
@@ -522,7 +522,7 @@ pn_ssl_domain_t *pn_ssl_domain( pn_ssl_mode_t mode )
// Mitigate the CRIME vulnerability
SSL_CTX_set_options(domain->ctx, SSL_OP_NO_COMPRESSION);
#endif
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#ifdef SSL_SECOP_PEER
domain->default_seclevel = SSL_CTX_get_security_level(domain->ctx);
#endif
@@ -719,7 +719,7 @@ int pn_ssl_domain_set_peer_authentication(pn_ssl_domain_t *domain,
case PN_SSL_VERIFY_PEER:
case PN_SSL_VERIFY_PEER_NAME:
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#ifdef SSL_SECOP_PEER
SSL_CTX_set_security_level(domain->ctx, domain->default_seclevel);
#endif
@@ -759,7 +759,7 @@ int pn_ssl_domain_set_peer_authentication(pn_ssl_domain_t *domain,
break;
case PN_SSL_ANONYMOUS_PEER: // hippie free love mode... :)
-#if OPENSSL_VERSION_NUMBER >= 0x10100000
+#ifdef SSL_SECOP_PEER
// Must use lowest OpenSSL security level to enable anonymous ciphers.
SSL_CTX_set_security_level(domain->ctx, 0);
#endif
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org