Fix OCSP_basic_verify signer certificate validation
[openssl.git] / crypto / ocsp / ocsp_vfy.c
index 7a4a45d537db02e12a8e847335da2524067d5a21..3c5f48ec0a4066aab60d4b006799cbf72fbe2012 100644 (file)
@@ -59,9 +59,10 @@ static int ocsp_verify_signer(X509 *signer, int response,
 
     ret = X509_verify_cert(ctx);
     if (ret <= 0) {
-        ret = X509_STORE_CTX_get_error(ctx);
+        int err = X509_STORE_CTX_get_error(ctx);
+
         ERR_raise_data(ERR_LIB_OCSP, OCSP_R_CERTIFICATE_VERIFY_ERROR,
-                       "Verify error: %s", X509_verify_cert_error_string(ret));
+                       "Verify error: %s", X509_verify_cert_error_string(err));
         goto end;
     }
     if (chain != NULL)