mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-15 08:37:48 -05:00
ITS#10326 mbedtls: always call mbedtls_ssl_set_hostname()
Even if hostname is NULL, the library requires this be called once. If non-NULL, mbedtls may do a hostname check which is redundant since libldap does its own check.
This commit is contained in:
parent
36dd6e2e62
commit
10456f5850
1 changed files with 3 additions and 5 deletions
|
|
@ -380,11 +380,9 @@ static int
|
|||
tlsmt_session_connect( LDAP *ld, tls_session *sess, const char *name_in )
|
||||
{
|
||||
tlsmt_session *s = (tlsmt_session *)sess;
|
||||
if (name_in) {
|
||||
int ret = mbedtls_ssl_set_hostname( &(s->ssl_ctx), name_in );
|
||||
if ( ret != 0 ) {
|
||||
return ret;
|
||||
}
|
||||
int ret = mbedtls_ssl_set_hostname( &(s->ssl_ctx), name_in );
|
||||
if ( ret != 0 ) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return tlsmt_session_accept(sess);
|
||||
|
|
|
|||
Loading…
Reference in a new issue