]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Constify X509_REQ_get1_email, X509_get1_email and X509_get1_ocsp.
authorMilan Broz <gmazyland@gmail.com>
Thu, 19 Feb 2026 12:05:21 +0000 (13:05 +0100)
committerNeil Horman <nhorman@openssl.org>
Fri, 20 Feb 2026 17:07:34 +0000 (12:07 -0500)
Functions seem not documented, but exported.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Fri Feb 20 17:07:41 2026
(Merged from https://github.com/openssl/openssl/pull/30082)

crypto/x509/v3_utl.c
include/openssl/x509v3.h.in

index e7abe6150af4b4d57c02e62ee667a4d2a3956206..ecb9e872d2f72959f8b09d6a27e86f63bcc6ecdc 100644 (file)
@@ -446,7 +446,7 @@ static int sk_strcmp(const char *const *a, const char *const *b)
     return strcmp(*a, *b);
 }
 
-STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x)
+STACK_OF(OPENSSL_STRING) *X509_get1_email(const X509 *x)
 {
     GENERAL_NAMES *gens;
     STACK_OF(OPENSSL_STRING) *ret;
@@ -457,7 +457,7 @@ STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x)
     return ret;
 }
 
-STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x)
+STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(const X509 *x)
 {
     AUTHORITY_INFO_ACCESS *info;
     STACK_OF(OPENSSL_STRING) *ret = NULL;
@@ -479,7 +479,7 @@ STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x)
     return ret;
 }
 
-STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x)
+STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(const X509_REQ *x)
 {
     GENERAL_NAMES *gens;
     STACK_OF(X509_EXTENSION) *exts;
index 76671367b80154ed8bb6d8dc91bca454df6a329f..de75440060041fb30109583902fcf28759ad68d5 100644 (file)
@@ -777,10 +777,10 @@ char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp);
 int X509_PURPOSE_get_trust(const X509_PURPOSE *xp);
 int X509_PURPOSE_set(int *p, int purpose);
 
-STACK_OF(OPENSSL_STRING) *X509_get1_email(X509 *x);
-STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x);
+STACK_OF(OPENSSL_STRING) *X509_get1_email(const X509 *x);
+STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(const X509_REQ *x);
 void X509_email_free(STACK_OF(OPENSSL_STRING) *sk);
-STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x);
+STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(const X509 *x);
 
 /* Flags for X509_check_* functions */