提交 7c5921e7 编写于 作者: D Dr. Stephen Henson

Handle empty case in X509_NAME canonical encoding.

上级 399f94bf
...@@ -320,6 +320,12 @@ static int x509_name_canon(X509_NAME *a) ...@@ -320,6 +320,12 @@ static int x509_name_canon(X509_NAME *a)
OPENSSL_free(a->canon_enc); OPENSSL_free(a->canon_enc);
a->canon_enc = NULL; a->canon_enc = NULL;
} }
/* Special case: empty X509_NAME => null encoding */
if (sk_X509_NAME_ENTRY_num(a->entries) == 0)
{
a->canon_enclen = 0;
return 1;
}
intname = sk_new_null(); intname = sk_new_null();
if(!intname) if(!intname)
goto err; goto err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册