diff options
author | Hugo Landau <hlandau@openssl.org> | 2022-03-03 17:27:23 +0000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2022-03-11 13:30:22 +1100 |
commit | add8c29badb315cb8137655893826562ff12a581 (patch) | |
tree | 3de7cb5097e4f277bac157c4e814f083956ae721 /crypto | |
parent | 3aeed22c593ae036c2503ac07276768c82fe5782 (diff) |
Fix issue where OBJ_nid2obj doesn't always raise an error
This was previously fixed in 3.0 but not 1.1.
Fixes #13008.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17808)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/objects/obj_dat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/objects/obj_dat.c b/crypto/objects/obj_dat.c index 46006fe6cf..a501ca104b 100644 --- a/crypto/objects/obj_dat.c +++ b/crypto/objects/obj_dat.c @@ -228,9 +228,10 @@ ASN1_OBJECT *OBJ_nid2obj(int n) return NULL; } return (ASN1_OBJECT *)&(nid_objs[n]); - } else if (added == NULL) + } else if (added == NULL) { + OBJerr(OBJ_F_OBJ_NID2OBJ, OBJ_R_UNKNOWN_NID); return NULL; - else { + } else { ad.type = ADDED_NID; ad.obj = &ob; ob.nid = n; |