diff options
-rw-r--r-- | src/lib/libcrypto/x509/x509_purp.c | 12 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509v3.h | 12 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/lib/libcrypto/x509/x509_purp.c b/src/lib/libcrypto/x509/x509_purp.c index 9d4ec3220c..d887d4c355 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.37 2024/03/02 10:40:05 tb Exp $ */ | 1 | /* $OpenBSD: x509_purp.c,v 1.38 2024/03/02 10:41:46 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 | */ |
@@ -68,6 +68,16 @@ | |||
68 | #include "x509_internal.h" | 68 | #include "x509_internal.h" |
69 | #include "x509_local.h" | 69 | #include "x509_local.h" |
70 | 70 | ||
71 | struct x509_purpose_st { | ||
72 | int purpose; | ||
73 | int trust; /* Default trust ID */ | ||
74 | int flags; | ||
75 | int (*check_purpose)(const struct x509_purpose_st *, const X509 *, int); | ||
76 | char *name; | ||
77 | char *sname; | ||
78 | void *usr_data; | ||
79 | } /* X509_PURPOSE */; | ||
80 | |||
71 | #define V1_ROOT (EXFLAG_V1|EXFLAG_SS) | 81 | #define V1_ROOT (EXFLAG_V1|EXFLAG_SS) |
72 | #define ku_reject(x, usage) \ | 82 | #define ku_reject(x, usage) \ |
73 | (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) | 83 | (((x)->ex_flags & EXFLAG_KUSAGE) && !((x)->ex_kusage & (usage))) |
diff --git a/src/lib/libcrypto/x509/x509v3.h b/src/lib/libcrypto/x509/x509v3.h index 118a449e82..6b7dc80bf3 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.27 2024/03/02 10:40:05 tb Exp $ */ | 1 | /* $OpenBSD: x509v3.h,v 1.28 2024/03/02 10:41:46 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 | */ |
@@ -422,15 +422,7 @@ struct ISSUING_DIST_POINT_st { | |||
422 | #define X509_PURPOSE_DYNAMIC 0x1 | 422 | #define X509_PURPOSE_DYNAMIC 0x1 |
423 | #define X509_PURPOSE_DYNAMIC_NAME 0x2 | 423 | #define X509_PURPOSE_DYNAMIC_NAME 0x2 |
424 | 424 | ||
425 | typedef struct x509_purpose_st { | 425 | typedef struct x509_purpose_st X509_PURPOSE; |
426 | int purpose; | ||
427 | int trust; /* Default trust ID */ | ||
428 | int flags; | ||
429 | int (*check_purpose)(const struct x509_purpose_st *, const X509 *, int); | ||
430 | char *name; | ||
431 | char *sname; | ||
432 | void *usr_data; | ||
433 | } X509_PURPOSE; | ||
434 | 426 | ||
435 | #define X509_PURPOSE_SSL_CLIENT 1 | 427 | #define X509_PURPOSE_SSL_CLIENT 1 |
436 | #define X509_PURPOSE_SSL_SERVER 2 | 428 | #define X509_PURPOSE_SSL_SERVER 2 |