diff options
author | jsing <> | 2020-09-16 05:47:59 +0000 |
---|---|---|
committer | jsing <> | 2020-09-16 05:47:59 +0000 |
commit | 8660475bbdacccc5f1131923e4bac54237a3b2b4 (patch) | |
tree | bd2fc7b59a9d7b28fff2edd437a7cbf981b082cf | |
parent | d53cd9028836afb4efd88e5cb84a24bebc22d18b (diff) | |
download | openbsd-8660475bbdacccc5f1131923e4bac54237a3b2b4.tar.gz openbsd-8660475bbdacccc5f1131923e4bac54237a3b2b4.tar.bz2 openbsd-8660475bbdacccc5f1131923e4bac54237a3b2b4.zip |
Make check in x509_verify_ctx_set_max_signatures() consistent with others.
ok beck@
-rw-r--r-- | src/lib/libcrypto/x509/x509_verify.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_verify.c b/src/lib/libcrypto/x509/x509_verify.c index 967952ead0..a1a9ecc5af 100644 --- a/src/lib/libcrypto/x509/x509_verify.c +++ b/src/lib/libcrypto/x509/x509_verify.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_verify.c,v 1.9 2020/09/16 05:47:01 jsing Exp $ */ | 1 | /* $OpenBSD: x509_verify.c,v 1.10 2020/09/16 05:47:59 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> | 3 | * Copyright (c) 2020 Bob Beck <beck@openbsd.org> |
4 | * | 4 | * |
@@ -775,9 +775,7 @@ x509_verify_ctx_set_max_chains(struct x509_verify_ctx *ctx, size_t max) | |||
775 | int | 775 | int |
776 | x509_verify_ctx_set_max_signatures(struct x509_verify_ctx *ctx, size_t max) | 776 | x509_verify_ctx_set_max_signatures(struct x509_verify_ctx *ctx, size_t max) |
777 | { | 777 | { |
778 | if (max < 1) | 778 | if (max < 1 || max > 100000) |
779 | return 0; | ||
780 | if (max > 100000) | ||
781 | return 0; | 779 | return 0; |
782 | ctx->max_sigs = max; | 780 | ctx->max_sigs = max; |
783 | return 1; | 781 | return 1; |