提交 309fa55b 编写于 作者: B Ben Laurie

Return an error if the serial number is badly formed. (Coverity ID 116).

上级 4b8747e4
...@@ -2406,6 +2406,8 @@ static int do_revoke(X509 *x509, CA_DB *db, int type, char *value) ...@@ -2406,6 +2406,8 @@ static int do_revoke(X509 *x509, CA_DB *db, int type, char *value)
row[i]=NULL; row[i]=NULL;
row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0); row[DB_name]=X509_NAME_oneline(X509_get_subject_name(x509),NULL,0);
bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL); bn = ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL);
if (!bn)
goto err;
if (BN_is_zero(bn)) if (BN_is_zero(bn))
row[DB_serial]=BUF_strdup("00"); row[DB_serial]=BUF_strdup("00");
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册