aca7c2c
From: Razvan Crainea <razvan@opensips.org>
aca7c2c
Date: Wed, 30 Nov 2016 20:44:46 +0200
aca7c2c
Subject: [PATCH] identity: complete port to openssl 1.1.0
aca7c2c
aca7c2c
Reported by Petr Pisar in issue #996
aca7c2c
aca7c2c
diff --git a/modules/identity/identity.c b/modules/identity/identity.c
aca7c2c
index 1d54b6d..9024e61 100644
aca7c2c
--- a/modules/identity/identity.c
aca7c2c
+++ b/modules/identity/identity.c
aca7c2c
@@ -1734,8 +1734,9 @@ static int verify_callback(int ok, X509_STORE_CTX * stor)
aca7c2c
 {
aca7c2c
 	if (!ok)
aca7c2c
 	{
aca7c2c
+		int err = X509_STORE_CTX_get_error(stor);
aca7c2c
 		LM_INFO("certificate validation failed: %s\n",
aca7c2c
-			X509_verify_cert_error_string(stor->error));
aca7c2c
+			X509_verify_cert_error_string(err));
aca7c2c
 	}
aca7c2c
 
aca7c2c
 	return ok;