]> git.ipfire.org Git - thirdparty/openssl.git/commit
Propagate const-correctness to PKCS7, CMS, and X509 attribute functions
authorJohn Smith <xaum.io@gmail.com>
Thu, 29 Jan 2026 05:07:16 +0000 (06:07 +0100)
committerTomas Mraz <tomas@openssl.org>
Fri, 13 Feb 2026 14:45:37 +0000 (15:45 +0100)
commitd24535c973bfb89c5bdc23452bbf7d49ae2361a1
tree5fddd26887e824b427f5533a655de5e5b1fa0fc8
parent0c841cd5aac5c9ee0c135689e131cd58c3fcea5d
Propagate const-correctness to PKCS7, CMS, and X509 attribute functions

Following the const-correctness changes to X509_ATTRIBUTE accessor
functions, update all dependent functions to also return const pointers:

PKCS7 functions:
- PKCS7_get_attribute: returns const ASN1_TYPE *
- PKCS7_get_signed_attribute: returns const ASN1_TYPE *
- PKCS7_digest_from_attributes: returns const ASN1_OCTET_STRING *

X509 functions:
- X509at_get0_data_by_OBJ: returns const void *

CMS functions:
- CMS_signed_get0_data_by_OBJ: returns const void *
- CMS_unsigned_get0_data_by_OBJ: returns const void *

Update all callers to use const-qualified pointers for return values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
MergeDate: Fri Feb 13 14:46:28 2026
(Merged from https://github.com/openssl/openssl/pull/29813)
12 files changed:
crypto/cms/cms_att.c
crypto/cms/cms_ess.c
crypto/cms/cms_local.h
crypto/cms/cms_sd.c
crypto/pkcs7/pk7_attr.c
crypto/pkcs7/pk7_doit.c
crypto/pkcs7/pk7_smime.c
crypto/ts/ts_rsp_verify.c
crypto/x509/x509_att.c
include/openssl/cms.h.in
include/openssl/pkcs7.h.in
include/openssl/x509.h.in