Skip to content
Snippets Groups Projects
Commit 327c0d6b authored by Guenter Knauf's avatar Guenter Knauf
Browse files

bail out with error if someone tries to use another cert than PEM with OpenLDAP.

parent 870842cc
No related branches found
No related tags found
No related merge requests found
......@@ -216,6 +216,12 @@ CURLcode Curl_ldap(struct connectdata *conn, bool *done)
#elif defined(LDAP_OPT_X_TLS)
if (data->set.ssl.verifypeer) {
/* OpenLDAP SDK supports BASE64 files. */
if ((data->set.str[STRING_CERT_TYPE]) &&
(!strequal(data->set.str[STRING_CERT_TYPE], "PEM"))) {
failf(data, "LDAP local: ERROR OpenLDAP does only support PEM cert-type!");
status = CURLE_SSL_CERTPROBLEM;
goto quit;
}
if (!ldap_ca) {
failf(data, "LDAP local: ERROR PEM CA cert not set!");
status = CURLE_SSL_CERTPROBLEM;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment