提交 0fb99904 编写于 作者: D Dr. Stephen Henson

return correct NID for undefined object

Reviewed-by: NTim Hudson <tjh@openssl.org>
上级 2974e3d4
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册