From: Akshit Akhoury Date: Fri, 2 Oct 2020 16:58:36 +0000 (+0530) Subject: Changing X509at_get0_data_by_OBJ to expect const stack of X509_ATTRIBUTE X-Git-Tag: OpenSSL_1_1_1i~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a23c23e4515d253d23b5c8258300873eca179c8;p=thirdparty%2Fopenssl.git Changing X509at_get0_data_by_OBJ to expect const stack of X509_ATTRIBUTE CLA: trivial Reviewed-by: Kurt Roeckx Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/13062) (cherry picked from commit 796948cd733d2bd0d8acbaf2354c718bcd4352a6) --- diff --git a/crypto/x509/x509_att.c b/crypto/x509/x509_att.c index 651aa780830..256c4fb8ef4 100644 --- a/crypto/x509/x509_att.c +++ b/crypto/x509/x509_att.c @@ -149,7 +149,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) return ret; } -void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, +void *X509at_get0_data_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj, int lastpos, int type) { int i; diff --git a/include/openssl/x509.h b/include/openssl/x509.h index b97ec342e2c..3ff86ec7b54 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -933,7 +933,7 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) int type, const unsigned char *bytes, int len); -void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, +void *X509at_get0_data_by_OBJ(const STACK_OF(X509_ATTRIBUTE) *x, const ASN1_OBJECT *obj, int lastpos, int type); X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, int atrtype, const void *data,