return correct NID for undefined object
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 0fb9990480
)
This commit is contained in:
parent
bb82db1c77
commit
228806a4f3
1 changed files with 3 additions and 0 deletions
|
@ -415,6 +415,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 a new issue