]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/init.c
ITS#8753 Public key pinning support in libldap
[openldap] / libraries / libldap / init.c
index 9b9f6177bdddd81a58128359f31182da11f06c9b..f48e22e83fa771b1e87dffe174fe40f160316889 100644 (file)
@@ -1,7 +1,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2015 The OpenLDAP Foundation.
+ * Copyright 1998-2017 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -130,6 +130,7 @@ static const struct ol_attribute {
        {0, ATTR_TLS,   "TLS_RANDFILE",         NULL,   LDAP_OPT_X_TLS_RANDOM_FILE},
        {0, ATTR_TLS,   "TLS_CIPHER_SUITE",     NULL,   LDAP_OPT_X_TLS_CIPHER_SUITE},
        {0, ATTR_TLS,   "TLS_PROTOCOL_MIN",     NULL,   LDAP_OPT_X_TLS_PROTOCOL_MIN},
+       {0, ATTR_TLS,   "TLS_PEERKEY_HASH",     NULL,   LDAP_OPT_X_TLS_PEERKEY_HASH},
 
 #ifdef HAVE_OPENSSL_CRL
        {0, ATTR_TLS,   "TLS_CRLCHECK",         NULL,   LDAP_OPT_X_TLS_CRLCHECK},
@@ -662,6 +663,12 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl )
        if ( ldap_int_tblsize == 0 ) ldap_int_ip_init();
 #endif
 
+#ifdef HAVE_CYRUS_SASL
+       if ( ldap_int_sasl_init() != 0 ) {
+               return;
+       }
+#endif
+
        ldap_int_initialize_global_options(gopts, dbglvl);
 
        if( getenv("LDAPNOINIT") != NULL ) {