summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsteve <steve>2012-03-05 15:48:13 +0000
committersteve <steve>2012-03-05 15:48:13 +0000
commit806a9fb85c754d0289d618dd4d8a70132b830776 (patch)
tree4b26c40b2e0e733e4f87c5db9347b59b80c8801a
parent796b4367efed7bc7eea65fffae1750b9a6aee619 (diff)
downloadopenssl-806a9fb85c754d0289d618dd4d8a70132b830776.tar.gz
don't do loop check for single self signed certificate
-rw-r--r--crypto/x509/x509_vfy.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index 18048da68..099881b7b 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -443,6 +443,9 @@ static int check_issued(X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
{
int i;
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++)
{
ch = sk_X509_value(ctx->chain, i);