diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-11-25 10:43:12 +0100 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2023-01-23 10:54:29 +0100 |
commit | b908ec0f217da0a23f9d81442f81d44c94c98f23 (patch) | |
tree | f41831e2c1fef85c95e2b629d6b575ba5e044385 /crypto/cmp/cmp_ctx.c | |
parent | 5acd4007a0646ef1f9d0015ce438b891d1b24a62 (diff) |
cmp_client_test.c: add tests for end_time being initialized for RR/GENM
To this end, tweak the internal handling of ctx->total_timeout.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/19391)
Diffstat (limited to 'crypto/cmp/cmp_ctx.c')
-rw-r--r-- | crypto/cmp/cmp_ctx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/cmp/cmp_ctx.c b/crypto/cmp/cmp_ctx.c index dcad9c8941..d01be8ebc7 100644 --- a/crypto/cmp/cmp_ctx.c +++ b/crypto/cmp/cmp_ctx.c @@ -919,9 +919,13 @@ int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val) ctx->keep_alive = val; break; case OSSL_CMP_OPT_MSG_TIMEOUT: + if (val < 0) + val = 0; ctx->msg_timeout = val; break; case OSSL_CMP_OPT_TOTAL_TIMEOUT: + if (val < 0) + val = 0; ctx->total_timeout = val; break; case OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR: |