summaryrefslogtreecommitdiffstats
path: root/crypto/cmp
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-05-04 15:49:47 +0200
committerHugo Landau <hlandau@openssl.org>2022-07-01 07:38:50 +0100
commitc4ad4e5bf67dae6f7729de5438c9a96a2abd0f92 (patch)
tree43d1e0c3c2dedd8d1b0c7e26b1d9f82ba9cb8b44 /crypto/cmp
parent3ee2611677e7e9f90e270f3ee4f343c9d3d86835 (diff)
CMP: introduce version 3, while version 2 stays the default
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18294)
Diffstat (limited to 'crypto/cmp')
-rw-r--r--crypto/cmp/cmp_local.h2
-rw-r--r--crypto/cmp/cmp_vfy.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/crypto/cmp/cmp_local.h b/crypto/cmp/cmp_local.h
index 3da021043b..07a8c8eab2 100644
--- a/crypto/cmp/cmp_local.h
+++ b/crypto/cmp/cmp_local.h
@@ -446,7 +446,7 @@ DECLARE_ASN1_FUNCTIONS(OSSL_CMP_POLLREPCONTENT)
/*-
* PKIHeader ::= SEQUENCE {
- * pvno INTEGER { cmp1999(1), cmp2000(2) },
+ * pvno INTEGER { cmp1999(1), cmp2000(2), cmp2021(3) },
* sender GeneralName,
* -- identifies the sender
* recipient GeneralName,
diff --git a/crypto/cmp/cmp_vfy.c b/crypto/cmp/cmp_vfy.c
index 5553abe914..a269ef49da 100644
--- a/crypto/cmp/cmp_vfy.c
+++ b/crypto/cmp/cmp_vfy.c
@@ -749,7 +749,8 @@ int ossl_cmp_msg_check_update(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg,
}
/* check CMP version number in header */
- if (ossl_cmp_hdr_get_pvno(hdr) != OSSL_CMP_PVNO) {
+ if (ossl_cmp_hdr_get_pvno(hdr) != OSSL_CMP_PVNO_2
+ && ossl_cmp_hdr_get_pvno(hdr) != OSSL_CMP_PVNO_3) {
#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
ERR_raise(ERR_LIB_CMP, CMP_R_UNEXPECTED_PVNO);
return 0;