Skip to content

Commit a9e440c

Browse files
committed
Merge branch 'refactor/hashlib/evp-nid-interface-134531' into feat/hashlib/evp-mac-134531
2 parents 0b75636 + 64539c8 commit a9e440c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Modules/_hashopenssl.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,16 +469,17 @@ get_hashentry_by_nid(int nid)
469469
}
470470

471471
/*
472-
* Convert the NID to a string via OBJ_nid2_*() functions.
472+
* Convert the NID to a string via OBJ_nid2*() functions.
473473
*
474-
* If 'nid' cannot be resolved or failed, set an exception and return NULL.
474+
* If 'nid' cannot be resolved, set an exception and return NULL.
475475
*/
476476
static const char *
477477
get_asn1_utf8name_by_nid(int nid)
478478
{
479479
const char *name = OBJ_nid2ln(nid);
480480
if (name == NULL) {
481481
// In OpenSSL 3.0 and later, OBJ_nid*() are thread-safe and may raise.
482+
assert(ERR_peek_last_error() != 0);
482483
if (ERR_GET_REASON(ERR_peek_last_error()) != OBJ_R_UNKNOWN_NID) {
483484
notify_ssl_error_occurred();
484485
return NULL;

0 commit comments

Comments
 (0)