mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
First version with TLS. Untested.
This commit is contained in:
parent
43fba8fcb1
commit
70fe83b1d2
1 changed files with 14 additions and 0 deletions
|
|
@ -252,6 +252,20 @@ open_ldap_connection( LDAP *ld, Sockbuf *sb, const char *host, int defport,
|
||||||
|
|
||||||
ber_pvt_sb_set_io( sb, &ber_pvt_sb_io_tcp, NULL );
|
ber_pvt_sb_set_io( sb, &ber_pvt_sb_io_tcp, NULL );
|
||||||
|
|
||||||
|
#ifdef HAVE_TLS
|
||||||
|
if ( ld->ld_options.ldo_tls_mode == LDAP_OPT_X_TLS_HARD ) {
|
||||||
|
/*
|
||||||
|
* Fortunately, the lib uses blocking io...
|
||||||
|
*/
|
||||||
|
if ( ldap_pvt_tls_connect( sb, ld->ld_options.ldo_tls_ctx ) <
|
||||||
|
0 ) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
/* FIXME: hostname of server must be compared with name in
|
||||||
|
* certificate....
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if ( krbinstancep != NULL ) {
|
if ( krbinstancep != NULL ) {
|
||||||
#ifdef HAVE_KERBEROS
|
#ifdef HAVE_KERBEROS
|
||||||
char *c;
|
char *c;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue