return correct NID for undefined object
Reviewed-by: Tim Hudson <tjh@openssl.org> (cherry picked from commit 0fb9990480919163cc375a2b6c0df1d8d901a77b)
This commit is contained in:
parent
ba5693686e
commit
3d2c3fa5fc
@ -417,6 +417,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…
x
Reference in New Issue
Block a user