mirror of
https://github.com/openssl/openssl.git
synced 2026-05-07 20:12:39 +00:00
0c841cd5aa
The X509_ATTRIBUTE accessor functions were not const-correct, preventing callers from usefully interacting with a const X509_ATTRIBUTE pointer. Update the following functions to accept const X509_ATTRIBUTE * and return const pointers where appropriate: - X509_ATTRIBUTE_get0_object: returns const ASN1_OBJECT * - X509_ATTRIBUTE_get0_type: returns const ASN1_TYPE * - X509_ATTRIBUTE_get0_data: returns const void * Also update dependent PKCS12 functions: - PKCS12_get_attr_gen: returns const ASN1_TYPE * - PKCS12_get_attr: returns const ASN1_TYPE * (deprecated) - PKCS8_get_attr: returns const ASN1_TYPE * Update all callers to use const pointers for the return values. Fixes #29811 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:26 2026 (Merged from https://github.com/openssl/openssl/pull/29813)