diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-03-24 10:33:16 +0100 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-04-18 19:54:17 +0200 |
commit | e599d0aecd3e9419d1558628cb42db9cf0fa5fd0 (patch) | |
tree | 09744b062a8d0f7f04251f1e13ee7deaee5ccf38 /crypto/cmp/cmp_server.c | |
parent | a81151bd56d55d52c40865f2f135355a2164062e (diff) |
Add CMP fuzzing to fuzz/cmp.c, including a couple of helpers in crypto/cmp/
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11386)
Diffstat (limited to 'crypto/cmp/cmp_server.c')
-rw-r--r-- | crypto/cmp/cmp_server.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/cmp/cmp_server.c b/crypto/cmp/cmp_server.c index c5c57fc8b7..ba5d751d92 100644 --- a/crypto/cmp/cmp_server.c +++ b/crypto/cmp/cmp_server.c @@ -492,11 +492,13 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, default: /* transactionID should be already initialized */ if (ctx->transactionID == NULL) { +#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION CMPerr(0, CMP_R_UNEXPECTED_PKIBODY); /* ignore any (extra) error in next two function calls: */ (void)OSSL_CMP_CTX_set1_transactionID(ctx, hdr->transactionID); (void)ossl_cmp_ctx_set1_recipNonce(ctx, hdr->senderNonce); goto err; +#endif } } @@ -547,6 +549,7 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, default: /* TODO possibly support further request message types */ CMPerr(0, CMP_R_UNEXPECTED_PKIBODY); + break; } err: |