Fix OCSP_basic_verify signer certificate validation
[openssl.git] / crypto / ocsp / ocsp_vfy.c
index ceefafc2a618d3cc906327b8bcf9fec018c1d407..e70602184fe1d6b1071e3f41222d1645f8ec083b 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)