summaryrefslogtreecommitdiffstats
path: root/crypto/cmp
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-09-19 13:15:04 +0200
committerDr. David von Oheimb <dev@ddvo.net>2022-11-25 09:19:37 +0100
commita2ede0396addd13f7fe9a629b450a14892152a83 (patch)
tree85bb68ac6b52e506bb768d29c07b8921511c4e40 /crypto/cmp
parent1c04866c671db4a6db0a1784399b351ea061bc16 (diff)
add missing OSSL_CMP_CTX_reset_geninfo_ITAVs() function
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> (Merged from https://github.com/openssl/openssl/pull/19216)
Diffstat (limited to 'crypto/cmp')
-rw-r--r--crypto/cmp/cmp_ctx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/cmp/cmp_ctx.c b/crypto/cmp/cmp_ctx.c
index d415877760..dcad9c8941 100644
--- a/crypto/cmp/cmp_ctx.c
+++ b/crypto/cmp/cmp_ctx.c
@@ -517,6 +517,17 @@ int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav)
return OSSL_CMP_ITAV_push0_stack_item(&ctx->geninfo_ITAVs, itav);
}
+int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx)
+{
+ if (ctx == NULL) {
+ ERR_raise(ERR_LIB_CMP, CMP_R_NULL_ARGUMENT);
+ return 0;
+ }
+ OSSL_CMP_ITAVs_free(ctx->geninfo_ITAVs);
+ ctx->geninfo_ITAVs = NULL;
+ return 1;
+}
+
/* Add an itav for the body of outgoing general messages */
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav)
{