summaryrefslogtreecommitdiffstats
path: root/fuzz
diff options
context:
space:
mode:
authorRajeev Ranjan <ranjan.rajeev@siemens.com>2023-03-13 09:16:57 +0100
committerDr. David von Oheimb <dev@ddvo.net>2023-12-21 22:53:35 +0100
commit192bfec487b27ee9398138ce5f0c5b00f536dc95 (patch)
treef8b1dbf16ab04f2542cb372dd0d89361d368ada4 /fuzz
parent682fd21afb5428b5716e62eaefb09a7419f9cfd7 (diff)
crypto/cmp/,apps/lib/cmp_mock_srv.c: add delayed delivery for all types of responses
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/20727)
Diffstat (limited to 'fuzz')
-rw-r--r--fuzz/cmp.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/fuzz/cmp.c b/fuzz/cmp.c
index 490c4211f8..37b6c310c3 100644
--- a/fuzz/cmp.c
+++ b/fuzz/cmp.c
@@ -155,6 +155,17 @@ static int process_pollReq(OSSL_CMP_SRV_CTX *srv_ctx,
return 0;
}
+static int reset_transaction(OSSL_CMP_SRV_CTX *srv_ctx)
+{
+ return 1;
+}
+
+static int delayed_delivery(OSSL_CMP_SRV_CTX *srv_ctx,
+ const OSSL_CMP_MSG *req)
+{
+ return 0;
+}
+
int FuzzerTestOneInput(const uint8_t *buf, size_t len)
{
OSSL_CMP_MSG *msg;
@@ -183,7 +194,9 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
print_noop)
&& OSSL_CMP_SRV_CTX_init(srv_ctx, NULL, process_cert_request,
process_rr, process_genm, process_error,
- process_certConf, process_pollReq))
+ process_certConf, process_pollReq)
+ && OSSL_CMP_SRV_CTX_setup_polling(srv_ctx, reset_transaction,
+ delayed_delivery))
OSSL_CMP_MSG_free(OSSL_CMP_SRV_process_request(srv_ctx, msg));
OSSL_CMP_CTX_free(client_ctx);