From b0ebb87ab5cfdee3e272f5ff9596e8beba4571a6 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Thu, 4 Jul 2024 09:29:14 +0200 Subject: [PATCH] constify ossl_x509at_add1_attr() Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24792) --- crypto/x509/x509_att.c | 2 +- include/crypto/x509.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c index c9e2b26c7a8..b21aa4d2994 100644 --- a/crypto/x509/x509_att.c +++ b/crypto/x509/x509_att.c @@ -80,7 +80,7 @@ X509_ATTRIBUTE *X509at_delete_attr(STACK_OF(X509_ATTRIBUTE) *x, int loc) } STACK_OF(X509_ATTRIBUTE) *ossl_x509at_add1_attr(STACK_OF(X509_ATTRIBUTE) **x, - X509_ATTRIBUTE *attr) + const X509_ATTRIBUTE *attr) { X509_ATTRIBUTE *new_attr = NULL; STACK_OF(X509_ATTRIBUTE) *sk = NULL; diff --git a/include/crypto/x509.h b/include/crypto/x509.h index 81d543a7a13..338e58b4919 100644 --- a/include/crypto/x509.h +++ b/include/crypto/x509.h @@ -373,7 +373,7 @@ 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); + const X509_ATTRIBUTE *attr); STACK_OF(X509_ATTRIBUTE) *ossl_x509at_add1_attr_by_OBJ(STACK_OF(X509_ATTRIBUTE) **x, const ASN1_OBJECT *obj, int type, -- 2.47.2