summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2020-09-16 05:48:00 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2020-09-16 05:48:00 +0000
commit053bcc99b9e724e6411d769f3152f47d23817e20 (patch)
tree36254a5cd4f6ecdab2db0932d878cc339e7c5931 /lib
parent82069b9dcbba351b31ad2184124b5d27d20d682d (diff)
Make check in x509_verify_ctx_set_max_signatures() consistent with others.
ok beck@
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/x509/x509_verify.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libcrypto/x509/x509_verify.c b/lib/libcrypto/x509/x509_verify.c
index 967952ead04..a1a9ecc5af3 100644
--- a/lib/libcrypto/x509/x509_verify.c
+++ b/lib/libcrypto/x509/x509_verify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_verify.c,v 1.9 2020/09/16 05:47:01 jsing Exp $ */
+/* $OpenBSD: x509_verify.c,v 1.10 2020/09/16 05:47:59 jsing Exp $ */
/*
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
*
@@ -775,9 +775,7 @@ x509_verify_ctx_set_max_chains(struct x509_verify_ctx *ctx, size_t max)
int
x509_verify_ctx_set_max_signatures(struct x509_verify_ctx *ctx, size_t max)
{
- if (max < 1)
- return 0;
- if (max > 100000)
+ if (max < 1 || max > 100000)
return 0;
ctx->max_sigs = max;
return 1;