[mod_openssl] fix compile with openssl 1.1.0
fix compile with openssl 1.1.0
remove stray tabs from prior commit
(thx gazoo74)
@@ -222,7 +222,12 @@ verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
return preverify_ok;
}
+ #if OPENSSL_VERSION_NUMBER >= 0x10002000L
err_cert = X509_STORE_CTX_get_current_cert(ctx);
+ #else
+ err_cert = ctx->current_cert;
+ #endif
+ if (NULL == err_cert) return !hctx->conf.ssl_verifyclient_enforce;
X509_NAME_oneline(X509_get_subject_name(err_cert), buf, sizeof(buf));
log_error_write(srv, __FILE__, __LINE__, "SDSSSDSS",
"SSL: verify error:num=", err, ":",
@@ -235,8 +240,7 @@ verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
*/
if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY ||
err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) {
- X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf,
- sizeof(buf));
+ X509_NAME_oneline(X509_get_issuer_name(err_cert), buf, sizeof(buf));
log_error_write(srv, __FILE__, __LINE__, "SS", "SSL: issuer=", buf);
}
