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
commitd49347f7949b43730d233c712acdf46d92dafb63 (patch)
tree4d803610e410b48b3d018e768095c497a47c0e9d /src/lib/libcrypto/x509/x509_enum.c
parentbed353985c301328078078daa32e94bb7391f930 (diff)
downloadopenbsd-d49347f7949b43730d233c712acdf46d92dafb63.tar.gz
openbsd-d49347f7949b43730d233c712acdf46d92dafb63.tar.bz2
openbsd-d49347f7949b43730d233c712acdf46d92dafb63.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);