mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 00:59:45 -05:00
ITS#5360 move tls option setup
This commit is contained in:
parent
584c7fb8be
commit
ae471f78c3
2 changed files with 7 additions and 10 deletions
|
|
@ -179,16 +179,6 @@ slap_init( int mode, const char *name )
|
|||
return 1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_TLS
|
||||
/* Library defaults to full certificate checking. This is correct when
|
||||
* a client is verifying a server because all servers should have a
|
||||
* valid cert. But few clients have valid certs, so we want our default
|
||||
* to be no checking. The config file can override this as usual.
|
||||
*/
|
||||
rc = 0;
|
||||
(void) ldap_pvt_tls_set_option( NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &rc );
|
||||
#endif
|
||||
|
||||
if ( frontend_init() ) {
|
||||
slap_debug |= LDAP_DEBUG_NONE;
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
|
|
|
|||
|
|
@ -736,6 +736,13 @@ unhandled_option:;
|
|||
SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 20 );
|
||||
goto destroy;
|
||||
}
|
||||
/* Library defaults to full certificate checking. This is correct when
|
||||
* a client is verifying a server because all servers should have a
|
||||
* valid cert. But few clients have valid certs, so we want our default
|
||||
* to be no checking. The config file can override this as usual.
|
||||
*/
|
||||
rc = LDAP_OPT_X_TLS_NEVER;
|
||||
(void) ldap_pvt_tls_set_option( slap_tls_ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &rc );
|
||||
#endif
|
||||
|
||||
rc = slap_init( serverMode, serverName );
|
||||
|
|
|
|||
Loading…
Reference in a new issue