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

don't do loop check for single self signed certificate

上级 ce0ed3b7
...@@ -443,6 +443,9 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer) ...@@ -443,6 +443,9 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
{ {
int i; int i;
X509 *ch; X509 *ch;
/* Special case: single self signed certificate */
if (cert_self_signed(x) && sk_X509_num(ctx->chain) == 1)
return 1;
for (i = 0; i < sk_X509_num(ctx->chain); i++) for (i = 0; i < sk_X509_num(ctx->chain); i++)
{ {
ch = sk_X509_value(ctx->chain, i); ch = sk_X509_value(ctx->chain, i);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册