Mon Jul 20 15:32:33 2009 UTC ()
catch up with openssl constification


(christos)
diff -r1.1.1.2 -r1.2 src/external/bsd/openldap/dist/libraries/libldap/tls.c

cvs diff -r1.1.1.2 -r1.2 src/external/bsd/openldap/dist/libraries/libldap/Attic/tls.c (expand / switch to unified diff)

--- src/external/bsd/openldap/dist/libraries/libldap/Attic/tls.c 2008/07/17 04:32:57 1.1.1.2
+++ src/external/bsd/openldap/dist/libraries/libldap/Attic/tls.c 2009/07/20 15:32:33 1.2
@@ -2776,29 +2776,29 @@ ldap_pvt_tls_sb_ctx( Sockbuf *sb ) @@ -2776,29 +2776,29 @@ ldap_pvt_tls_sb_ctx( Sockbuf *sb )
2776 if (HAS_TLS( sb )) { 2776 if (HAS_TLS( sb )) {
2777 ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_SSL, (void *)&p ); 2777 ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_SSL, (void *)&p );
2778 return p; 2778 return p;
2779 } 2779 }
2780#endif 2780#endif
2781 2781
2782 return NULL; 2782 return NULL;
2783} 2783}
2784 2784
2785int 2785int
2786ldap_pvt_tls_get_strength( void *s ) 2786ldap_pvt_tls_get_strength( void *s )
2787{ 2787{
2788#ifdef HAVE_OPENSSL 2788#ifdef HAVE_OPENSSL
2789 SSL_CIPHER *c; 2789 const SSL_CIPHER *c;
2790 2790
2791 c = SSL_get_current_cipher((SSL *)s); 2791 c = SSL_get_current_cipher((const SSL *)s);
2792 return SSL_CIPHER_get_bits(c, NULL); 2792 return SSL_CIPHER_get_bits(c, NULL);
2793#elif defined(HAVE_GNUTLS) 2793#elif defined(HAVE_GNUTLS)
2794 tls_session *session = s; 2794 tls_session *session = s;
2795 gnutls_cipher_algorithm_t c; 2795 gnutls_cipher_algorithm_t c;
2796 2796
2797 c = gnutls_cipher_get( session->session ); 2797 c = gnutls_cipher_get( session->session );
2798 return gnutls_cipher_get_key_size( c ) * 8; 2798 return gnutls_cipher_get_key_size( c ) * 8;
2799#else 2799#else
2800 return 0; 2800 return 0;
2801#endif 2801#endif
2802} 2802}
2803 2803
2804 2804