X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=libraries%2Flibldap%2Ftls_o.c;h=338e5279696f2504500f939c6be102c44a8e02e8;hb=6062cd9777bd2e1d9d99e5b3d5e25d0dab87f7ba;hp=8a3876779da711e7cef0e9dd8c5b9fa8fba1c4df;hpb=d9edc7d5afd2860fac2fa0121044db28d94c9f7f;p=openldap diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c index 8a3876779d..338e527969 100644 --- a/libraries/libldap/tls_o.c +++ b/libraries/libldap/tls_o.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 2008-2011 The OpenLDAP Foundation. + * Copyright 2008-2012 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -501,12 +501,8 @@ tlso_session_chkhost( LDAP *ld, tls_session *sess, const char *name_in ) } #ifdef LDAP_PF_INET6 - if (name[0] == '[' && strchr(name, ']')) { - char *n2 = ldap_strdup(name+1); - *strchr(n2, ']') = 0; - if (inet_pton(AF_INET6, n2, &addr)) - ntype = IS_IP6; - LDAP_FREE(n2); + if (inet_pton(AF_INET6, name, &addr)) { + ntype = IS_IP6; } else #endif if ((ptr = strrchr(name, '.')) && isdigit((unsigned char)ptr[1])) { @@ -657,10 +653,8 @@ static int tlso_session_strength( tls_session *sess ) { tlso_session *s = (tlso_session *)sess; - SSL_CIPHER *c; - c = SSL_get_current_cipher(s); - return SSL_CIPHER_get_bits(c, NULL); + return SSL_CIPHER_get_bits(SSL_get_current_cipher(s), NULL); } /*