[asterisk-scf-commits] asterisk-scf/release/pjproject.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Mon Oct 24 14:40:53 CDT 2011


branch "master" has been updated
       via  382bb4be711be54cf783cc5a40e9050450d69e7a (commit)
       via  d8c7dd200994c93820a471388a537b8194d4fa87 (commit)
      from  eb5da345a860acc74a8c1e38a7a3b2fa498b6599 (commit)

Summary of changes:
 pjlib/src/pj/ssl_sock_ossl.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 382bb4be711be54cf783cc5a40e9050450d69e7a
Merge: eb5da34 d8c7dd2
Author: David M. Lee <dlee at digium.com>
Date:   Mon Oct 24 14:40:34 2011 -0500

    Merge remote-tracking branch 'integration/fix-oneiric'


commit d8c7dd200994c93820a471388a537b8194d4fa87
Author: David M. Lee <dlee at digium.com>
Date:   Mon Oct 24 12:59:00 2011 -0500

    Fixed for Ubuntu Oneiric.
    
    In Oneiric, OpenSSL has SSLv2 disabled, which results in link errors
    unless you #ifdef appropriately.

diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c
index f5ccb4c..aabbc5b 100644
--- a/pjlib/src/pj/ssl_sock_ossl.c
+++ b/pjlib/src/pj/ssl_sock_ossl.c
@@ -309,13 +309,24 @@ static pj_status_t init_openssl(void)
 	STACK_OF(SSL_CIPHER) *sk_cipher;
 	unsigned i, n;
 
+#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 	meth = (SSL_METHOD*)SSLv23_server_method();
+#endif
+
+#if !defined(OPENSSL_NO_TLS1)
 	if (!meth)
 	    meth = (SSL_METHOD*)TLSv1_server_method();
+#endif
+
+#if !defined(OPENSSL_NO_SSL3)
 	if (!meth)
 	    meth = (SSL_METHOD*)SSLv3_server_method();
+#endif
+
+#if !defined(OPENSSL_NO_SSL2)
 	if (!meth)
 	    meth = (SSL_METHOD*)SSLv2_server_method();
+#endif
 	pj_assert(meth);
 
 	ctx=SSL_CTX_new(meth);
@@ -489,18 +500,26 @@ static pj_status_t create_ssl(pj_ssl_sock_t *ssock)
     /* Determine SSL method to use */
     switch (ssock->param.proto) {
     case PJ_SSL_SOCK_PROTO_DEFAULT:
+#if !defined(OPENSSL_NO_TLS1)
     case PJ_SSL_SOCK_PROTO_TLS1:
 	ssl_method = (SSL_METHOD*)TLSv1_method();
 	break;
+#endif
+#if !defined(OPENSSL_NO_SSL2)
     case PJ_SSL_SOCK_PROTO_SSL2:
 	ssl_method = (SSL_METHOD*)SSLv2_method();
 	break;
+#endif
+#if !defined(OPENSSL_NO_SSL3)
     case PJ_SSL_SOCK_PROTO_SSL3:
 	ssl_method = (SSL_METHOD*)SSLv3_method();
 	break;
+#endif
+#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
     case PJ_SSL_SOCK_PROTO_SSL23:
 	ssl_method = (SSL_METHOD*)SSLv23_method();
 	break;
+#endif
     //case PJ_SSL_SOCK_PROTO_DTLS1:
 	//ssl_method = (SSL_METHOD*)DTLSv1_method();
 	//break;

-----------------------------------------------------------------------


-- 
asterisk-scf/release/pjproject.git



More information about the asterisk-scf-commits mailing list