From: Dr. David von Oheimb Date: Thu, 4 Jul 2024 07:29:14 +0000 (+0200) Subject: constify ossl_x509at_add1_attr() X-Git-Tag: openssl-3.4.0-alpha1~368 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0ebb87ab5cfdee3e272f5ff9596e8beba4571a6;p=thirdparty%2Fopenssl.git constify ossl_x509at_add1_attr() Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/24792) --- 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,