]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
constify ossl_x509at_add1_attr()
authorDr. David von Oheimb <dev@ddvo.net>
Thu, 4 Jul 2024 07:29:14 +0000 (09:29 +0200)
committerTomas Mraz <tomas@openssl.org>
Wed, 10 Jul 2024 14:19:06 +0000 (16:19 +0200)
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24792)

crypto/x509/x509_att.c
include/crypto/x509.h

index c9e2b26c7a82cd88028e173719d9a843e045feac..b21aa4d2994099f68690d58d9b868c129453eedf 100644 (file)
@@ -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;
index 81d543a7a13892eda1fae2d872514d909c151ff4..338e58b4919f9a12a31ca3833d968b1016350dc4 100644 (file)
@@ -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,