diff options
author | Tomas Mraz <tomas@openssl.org> | 2023-12-13 12:21:04 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-01-03 12:46:16 +0100 |
commit | 41dd0e0433d171a19fdc8e52a94e3d0a79c84281 (patch) | |
tree | a78accb0dde935da7fea8226e99334b5d4240106 /include | |
parent | ec290623e3eac42357189bf7c242ca7b18be1bc4 (diff) |
Allow duplicate CMS attributes
Fixes regression introduced with https://github.com/openssl/openssl/pull/21505
Fixes #22266
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23029)
(cherry picked from commit d7e707cb4983a35b1a265c6042da410d829f3b19)
Diffstat (limited to 'include')
-rw-r--r-- | include/crypto/x509.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/crypto/x509.h b/include/crypto/x509.h index 631150b769..6e79f1f288 100644 --- a/include/crypto/x509.h +++ b/include/crypto/x509.h @@ -367,4 +367,21 @@ EVP_PKEY *ossl_d2i_PUBKEY_legacy(EVP_PKEY **a, const unsigned char **pp, int x509v3_add_len_value_uchar(const char *name, const unsigned char *value, size_t vallen, STACK_OF(CONF_VALUE) **extlist); +/* Attribute addition functions not checking for duplicate attributes */ +STACK_OF(X509_ATTRIBUTE) *ossl_x509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, + X509_ATTRIBUTE *attr); +STACK_OF(X509_ATTRIBUTE) *ossl_x509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, + const ASN1_OBJECT *obj, + int type, + const unsigned char *bytes, + int len); +STACK_OF(X509_ATTRIBUTE) *ossl_x509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, + int nid, int type, + const unsigned char *bytes, + int len); +STACK_OF(X509_ATTRIBUTE) *ossl_x509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, + const char *attrname, + int type, + const unsigned char *bytes, + int len); #endif /* OSSL_CRYPTO_X509_H */ |