diff options
| author | jsing <> | 2020-09-16 05:47:59 +0000 |
|---|---|---|
| committer | jsing <> | 2020-09-16 05:47:59 +0000 |
| commit | c77cfc6cbd58d3cb87224ddeeee1ba8d7254bf61 (patch) | |
| tree | bd2fc7b59a9d7b28fff2edd437a7cbf981b082cf | |
| parent | 295c92957de5d0482b34104958624cea0184cbf3 (diff) | |
| download | openbsd-c77cfc6cbd58d3cb87224ddeeee1ba8d7254bf61.tar.gz openbsd-c77cfc6cbd58d3cb87224ddeeee1ba8d7254bf61.tar.bz2 openbsd-c77cfc6cbd58d3cb87224ddeeee1ba8d7254bf61.zip | |
Make check in x509_verify_ctx_set_max_signatures() consistent with others.
ok beck@
Diffstat (limited to '')
| -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; |
