Skip to content

Commit f1127a1

Browse files
committed
raise an ImportError when failing to fetch OpenSSL HMAC
1 parent 3640c09 commit f1127a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_hashopenssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2652,7 +2652,7 @@ hashlib_init_hmactype(PyObject *module)
26522652
#ifdef Py_HAS_OPENSSL3_SUPPORT
26532653
state->evp_hmac = EVP_MAC_fetch(NULL, "HMAC", NULL);
26542654
if (state->evp_hmac == NULL) {
2655-
raise_ssl_error(PyExc_RuntimeError, "cannot initialize EVP_MAC HMAC");
2655+
raise_ssl_error(PyExc_ImportError, "cannot initialize EVP_MAC HMAC");
26562656
return -1;
26572657
}
26582658
#endif

0 commit comments

Comments
 (0)