summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_purp.c
diff options
context:
space:
mode:
authortb <>2024-03-02 10:41:46 +0000
committertb <>2024-03-02 10:41:46 +0000
commitb2a3fdcc5976cc3b2620d253495952a4e58f80ae (patch)
tree2c57c8e32636177c1d48188c8a9e0b0ff6c2421f /src/lib/libcrypto/x509/x509_purp.c
parent5a6928bc4b6854c45366b0767c4f86969e8f1e70 (diff)
downloadopenbsd-b2a3fdcc5976cc3b2620d253495952a4e58f80ae.tar.gz
openbsd-b2a3fdcc5976cc3b2620d253495952a4e58f80ae.tar.bz2
openbsd-b2a3fdcc5976cc3b2620d253495952a4e58f80ae.zip
Make X509_PURPOSE opaque
Code using details of X509_PURPOSE does so by using API. So we can make this struct opaque. ok jsing
Diffstat (limited to 'src/lib/libcrypto/x509/x509_purp.c')
-rw-r--r--src/lib/libcrypto/x509/x509_purp.c12
1 files changed, 11 insertions, 1 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
71struct 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)))