return correct NID for undefined object
Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
2974e3d464
commit
0fb9990480
@ -397,6 +397,9 @@ int OBJ_obj2nid(const ASN1_OBJECT *a)
|
||||
if (a->nid != 0)
|
||||
return (a->nid);
|
||||
|
||||
if (a->length == 0)
|
||||
return NID_undef;
|
||||
|
||||
if (added != NULL) {
|
||||
ad.type = ADDED_DATA;
|
||||
ad.obj = (ASN1_OBJECT *)a; /* XXX: ugly but harmless */
|
||||
|
Loading…
Reference in New Issue
Block a user