summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509_enum.c
diff options
context:
space:
mode:
authortb <>2023-04-21 06:07:10 +0000
committertb <>2023-04-21 06:07:10 +0000
commitaf98f5cdbc5f574e1562f0b8b599d38cbeb1f6ac (patch)
tree4d803610e410b48b3d018e768095c497a47c0e9d /src/lib/libcrypto/x509/x509_enum.c
parent80636c1a555b4cf47882282b4398a903ee25812e (diff)
downloadopenbsd-af98f5cdbc5f574e1562f0b8b599d38cbeb1f6ac.tar.gz
openbsd-af98f5cdbc5f574e1562f0b8b599d38cbeb1f6ac.tar.bz2
openbsd-af98f5cdbc5f574e1562f0b8b599d38cbeb1f6ac.zip
Move i2s_ASN1_ENUMERATED_TABLE() next to i2s_ASN1_ENUMERATED()
These functions probably belong into asn1/ but they definitely don't belong into separate files.
Diffstat (limited to 'src/lib/libcrypto/x509/x509_enum.c')
-rw-r--r--src/lib/libcrypto/x509/x509_enum.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/lib/libcrypto/x509/x509_enum.c b/src/lib/libcrypto/x509/x509_enum.c
index 7eabab7483..0f3bfea4c7 100644
--- a/src/lib/libcrypto/x509/x509_enum.c
+++ b/src/lib/libcrypto/x509/x509_enum.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_enum.c,v 1.5 2023/04/21 06:00:24 tb Exp $ */ 1/* $OpenBSD: x509_enum.c,v 1.6 2023/04/21 06:07:10 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 */
@@ -92,18 +92,3 @@ const X509V3_EXT_METHOD v3_crl_reason = {
92 .r2i = NULL, 92 .r2i = NULL,
93 .usr_data = crl_reasons, 93 .usr_data = crl_reasons,
94}; 94};
95
96char *
97i2s_ASN1_ENUMERATED_TABLE(X509V3_EXT_METHOD *method, const ASN1_ENUMERATED *e)
98{
99 BIT_STRING_BITNAME *enam;
100 long strval;
101
102 strval = ASN1_ENUMERATED_get(e);
103 for (enam = method->usr_data; enam->lname; enam++) {
104 if (strval == enam->bitnum)
105 return strdup(enam->lname);
106 }
107 return i2s_ASN1_ENUMERATED(method, e);
108}
109LCRYPTO_ALIAS(i2s_ASN1_ENUMERATED_TABLE);