Fix error compiling with openssl 1.1.0
authorSebastian Blunt <sebastian@c4k3.net>
Fri, 28 Apr 2017 12:18:17 +0000 (14:18 +0200)
committerSebastian Blunt <sebastian@c4k3.net>
Fri, 28 Apr 2017 12:18:17 +0000 (14:18 +0200)
Would throw a dereferencing pointer to incomplete type previously. This
change is compatible with both openssl 1.1.0 and 1.0.2, the only
supported openssl releases.

Building with autotools and openssl 1.1.0 does still not work.

src/ssli_openssl.c

index 009119d6280dddda18d0b46d754e029e3970f8f7..8ff1bcf41400c02eaef71e85b0a7463e8aff27dd 100644 (file)
@@ -411,7 +411,7 @@ static int verify_callback(int preverify_ok, X509_STORE_CTX *ctx)
      * it for something special
      */
     if (!preverify_ok && (err == X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) {
-           X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256);
+           X509_NAME_oneline(X509_get_issuer_name(err_cert), buf, 256);
            Log_warn("issuer= %s", buf);
     }
     return 1;