diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/x509/x509_purp.c | 12 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509v3.h | 9 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/libcrypto/x509/x509_purp.c b/src/lib/libcrypto/x509/x509_purp.c index d887d4c355..53f4f2f967 100644 --- a/src/lib/libcrypto/x509/x509_purp.c +++ b/src/lib/libcrypto/x509/x509_purp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_purp.c,v 1.38 2024/03/02 10:41:46 tb Exp $ */ | 1 | /* $OpenBSD: x509_purp.c,v 1.39 2024/03/02 10:43:52 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2001. | 3 | * project 2001. |
4 | */ | 4 | */ |
@@ -105,7 +105,7 @@ static int check_purpose_timestamp_sign(const X509_PURPOSE *xp, const X509 *x, | |||
105 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca); | 105 | static int no_check(const X509_PURPOSE *xp, const X509 *x, int ca); |
106 | static int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca); | 106 | static int ocsp_helper(const X509_PURPOSE *xp, const X509 *x, int ca); |
107 | 107 | ||
108 | static X509_PURPOSE xstandard[] = { | 108 | static const X509_PURPOSE xstandard[] = { |
109 | { | 109 | { |
110 | .purpose = X509_PURPOSE_SSL_CLIENT, | 110 | .purpose = X509_PURPOSE_SSL_CLIENT, |
111 | .trust = X509_TRUST_SSL_CLIENT, | 111 | .trust = X509_TRUST_SSL_CLIENT, |
@@ -204,7 +204,7 @@ X509_PURPOSE_get_count(void) | |||
204 | } | 204 | } |
205 | LCRYPTO_ALIAS(X509_PURPOSE_get_count); | 205 | LCRYPTO_ALIAS(X509_PURPOSE_get_count); |
206 | 206 | ||
207 | X509_PURPOSE * | 207 | const X509_PURPOSE * |
208 | X509_PURPOSE_get0(int idx) | 208 | X509_PURPOSE_get0(int idx) |
209 | { | 209 | { |
210 | if (idx < 0 || (size_t)idx >= X509_PURPOSE_COUNT) | 210 | if (idx < 0 || (size_t)idx >= X509_PURPOSE_COUNT) |
@@ -218,7 +218,7 @@ int | |||
218 | X509_PURPOSE_get_by_sname(const char *sname) | 218 | X509_PURPOSE_get_by_sname(const char *sname) |
219 | { | 219 | { |
220 | int i; | 220 | int i; |
221 | X509_PURPOSE *xptmp; | 221 | const X509_PURPOSE *xptmp; |
222 | 222 | ||
223 | for (i = 0; i < X509_PURPOSE_get_count(); i++) { | 223 | for (i = 0; i < X509_PURPOSE_get_count(); i++) { |
224 | xptmp = X509_PURPOSE_get0(i); | 224 | xptmp = X509_PURPOSE_get0(i); |
@@ -249,14 +249,14 @@ X509_PURPOSE_get_id(const X509_PURPOSE *xp) | |||
249 | } | 249 | } |
250 | LCRYPTO_ALIAS(X509_PURPOSE_get_id); | 250 | LCRYPTO_ALIAS(X509_PURPOSE_get_id); |
251 | 251 | ||
252 | char * | 252 | const char * |
253 | X509_PURPOSE_get0_name(const X509_PURPOSE *xp) | 253 | X509_PURPOSE_get0_name(const X509_PURPOSE *xp) |
254 | { | 254 | { |
255 | return xp->name; | 255 | return xp->name; |
256 | } | 256 | } |
257 | LCRYPTO_ALIAS(X509_PURPOSE_get0_name); | 257 | LCRYPTO_ALIAS(X509_PURPOSE_get0_name); |
258 | 258 | ||
259 | char * | 259 | const char * |
260 | X509_PURPOSE_get0_sname(const X509_PURPOSE *xp) | 260 | X509_PURPOSE_get0_sname(const X509_PURPOSE *xp) |
261 | { | 261 | { |
262 | return xp->sname; | 262 | return xp->sname; |
diff --git a/src/lib/libcrypto/x509/x509v3.h b/src/lib/libcrypto/x509/x509v3.h index 6b7dc80bf3..1004f6f15b 100644 --- a/src/lib/libcrypto/x509/x509v3.h +++ b/src/lib/libcrypto/x509/x509v3.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509v3.h,v 1.28 2024/03/02 10:41:46 tb Exp $ */ | 1 | /* $OpenBSD: x509v3.h,v 1.29 2024/03/02 10:43:52 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 1999. | 3 | * project 1999. |
4 | */ | 4 | */ |
@@ -713,11 +713,12 @@ int X509_check_purpose(X509 *x, int id, int ca); | |||
713 | int X509_supported_extension(X509_EXTENSION *ex); | 713 | int X509_supported_extension(X509_EXTENSION *ex); |
714 | int X509_check_issued(X509 *issuer, X509 *subject); | 714 | int X509_check_issued(X509 *issuer, X509 *subject); |
715 | int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); | 715 | int X509_check_akid(X509 *issuer, AUTHORITY_KEYID *akid); |
716 | |||
716 | int X509_PURPOSE_get_count(void); | 717 | int X509_PURPOSE_get_count(void); |
717 | X509_PURPOSE *X509_PURPOSE_get0(int idx); | 718 | const X509_PURPOSE *X509_PURPOSE_get0(int idx); |
718 | int X509_PURPOSE_get_by_sname(const char *sname); | 719 | int X509_PURPOSE_get_by_sname(const char *sname); |
719 | char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp); | 720 | const char *X509_PURPOSE_get0_name(const X509_PURPOSE *xp); |
720 | char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp); | 721 | const char *X509_PURPOSE_get0_sname(const X509_PURPOSE *xp); |
721 | int X509_PURPOSE_get_id(const X509_PURPOSE *); | 722 | int X509_PURPOSE_get_id(const X509_PURPOSE *); |
722 | uint32_t X509_get_extension_flags(X509 *x); | 723 | uint32_t X509_get_extension_flags(X509 *x); |
723 | uint32_t X509_get_key_usage(X509 *x); | 724 | uint32_t X509_get_key_usage(X509 *x); |