mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-103256: Fix hmac algorithm to support fallback implementation (gh-103286)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
parent
f0424ba4b6
commit
efb0a2cf3a
3 changed files with 17 additions and 1 deletions
|
@ -355,7 +355,7 @@ py_digest_by_name(PyObject *module, const char *name, enum Py_hash_type py_ht)
|
|||
}
|
||||
}
|
||||
if (digest == NULL) {
|
||||
_setException(PyExc_ValueError, "unsupported hash type %s", name);
|
||||
_setException(state->unsupported_digestmod_error, "unsupported hash type %s", name);
|
||||
return NULL;
|
||||
}
|
||||
return digest;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue