- /* Netscape sdk only supports a cert7.db file
- */
- if (st->cert_file_type == LDAP_CA_TYPE_CERT7_DB)
- {
- rc = ldapssl_client_init(st->cert_auth_file, NULL);
- }
- else
- {
- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
- "LDAP: Invalid LDAPTrustedCAType directive - "
- "CERT7_DB_PATH type required");
- rc = -1;
- }
-
- #elif APR_HAS_NOVELL_LDAPSDK
-
- /* Novell SDK supports DER or BASE64 files
- */
- if (st->cert_file_type == LDAP_CA_TYPE_DER ||
- st->cert_file_type == LDAP_CA_TYPE_BASE64 )
- {
- rc = ldapssl_client_init(NULL, NULL);
- if (LDAP_SUCCESS == rc)
- {
- if (st->cert_file_type == LDAP_CA_TYPE_BASE64)
- rc = ldapssl_add_trusted_cert(st->cert_auth_file,
- LDAPSSL_CERT_FILETYPE_B64);
- else
- rc = ldapssl_add_trusted_cert(st->cert_auth_file,
- LDAPSSL_CERT_FILETYPE_DER);
-
- if (LDAP_SUCCESS != rc)
- ldapssl_client_deinit();
- }
- }
- else
- {
- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
- "LDAP: Invalid LDAPTrustedCAType directive - "
- "DER_FILE or BASE64_FILE type required");
- rc = -1;
- }
-
- #elif APR_HAS_OPENLDAP_LDAPSDK
-
- /* OpenLDAP SDK supports BASE64 files
- */
- if (st->cert_file_type == LDAP_CA_TYPE_BASE64)
- {
- rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_CACERTFILE, st->cert_auth_file);
- }
- else
- {
- ap_log_error(APLOG_MARK, APLOG_CRIT, 0, s,
- "LDAP: Invalid LDAPTrustedCAType directive - "
- "BASE64_FILE type required");
- rc = -1;
- }
-
-
- #elif APR_HAS_MICROSOFT_LDAPSDK
-
- /* Microsoft SDK use the registry certificate store - always
- * assume support is always available
- */
- rc = LDAP_SUCCESS;
-
- #else
- rc = -1;
- #endif /* APR_HAS_NETSCAPE_LDAPSDK */