diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509_bitst.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_bitst.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/lib/libcrypto/x509/x509_bitst.c b/src/lib/libcrypto/x509/x509_bitst.c index 4c36d31b03..0328310f08 100644 --- a/src/lib/libcrypto/x509/x509_bitst.c +++ b/src/lib/libcrypto/x509/x509_bitst.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_bitst.c,v 1.5 2024/06/18 08:29:40 tb Exp $ */ | 1 | /* $OpenBSD: x509_bitst.c,v 1.6 2024/07/13 15:08:58 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 | */ |
@@ -102,7 +102,7 @@ static BIT_STRING_BITNAME crl_reasons[] = { | |||
102 | {-1, NULL, NULL} | 102 | {-1, NULL, NULL} |
103 | }; | 103 | }; |
104 | 104 | ||
105 | const X509V3_EXT_METHOD v3_nscert = { | 105 | static const X509V3_EXT_METHOD x509v3_ext_netscape_cert_type = { |
106 | .ext_nid = NID_netscape_cert_type, | 106 | .ext_nid = NID_netscape_cert_type, |
107 | .ext_flags = 0, | 107 | .ext_flags = 0, |
108 | .it = &ASN1_BIT_STRING_it, | 108 | .it = &ASN1_BIT_STRING_it, |
@@ -119,7 +119,13 @@ const X509V3_EXT_METHOD v3_nscert = { | |||
119 | .usr_data = ns_cert_type_table, | 119 | .usr_data = ns_cert_type_table, |
120 | }; | 120 | }; |
121 | 121 | ||
122 | const X509V3_EXT_METHOD v3_key_usage = { | 122 | const X509V3_EXT_METHOD * |
123 | x509v3_ext_method_netscape_cert_type(void) | ||
124 | { | ||
125 | return &x509v3_ext_netscape_cert_type; | ||
126 | } | ||
127 | |||
128 | static const X509V3_EXT_METHOD x509v3_ext_key_usage = { | ||
123 | .ext_nid = NID_key_usage, | 129 | .ext_nid = NID_key_usage, |
124 | .ext_flags = 0, | 130 | .ext_flags = 0, |
125 | .it = &ASN1_BIT_STRING_it, | 131 | .it = &ASN1_BIT_STRING_it, |
@@ -136,7 +142,13 @@ const X509V3_EXT_METHOD v3_key_usage = { | |||
136 | .usr_data = key_usage_type_table, | 142 | .usr_data = key_usage_type_table, |
137 | }; | 143 | }; |
138 | 144 | ||
139 | const X509V3_EXT_METHOD v3_crl_reason = { | 145 | const X509V3_EXT_METHOD * |
146 | x509v3_ext_method_key_usage(void) | ||
147 | { | ||
148 | return &x509v3_ext_key_usage; | ||
149 | } | ||
150 | |||
151 | static const X509V3_EXT_METHOD x509v3_ext_crl_reason = { | ||
140 | .ext_nid = NID_crl_reason, | 152 | .ext_nid = NID_crl_reason, |
141 | .ext_flags = 0, | 153 | .ext_flags = 0, |
142 | .it = &ASN1_ENUMERATED_it, | 154 | .it = &ASN1_ENUMERATED_it, |
@@ -153,6 +165,12 @@ const X509V3_EXT_METHOD v3_crl_reason = { | |||
153 | .usr_data = crl_reasons, | 165 | .usr_data = crl_reasons, |
154 | }; | 166 | }; |
155 | 167 | ||
168 | const X509V3_EXT_METHOD * | ||
169 | x509v3_ext_method_crl_reason(void) | ||
170 | { | ||
171 | return &x509v3_ext_crl_reason; | ||
172 | } | ||
173 | |||
156 | STACK_OF(CONF_VALUE) * | 174 | STACK_OF(CONF_VALUE) * |
157 | i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, ASN1_BIT_STRING *bits, | 175 | i2v_ASN1_BIT_STRING(X509V3_EXT_METHOD *method, ASN1_BIT_STRING *bits, |
158 | STACK_OF(CONF_VALUE) *ret) | 176 | STACK_OF(CONF_VALUE) *ret) |