diff options
author | tb <> | 2023-04-21 06:11:56 +0000 |
---|---|---|
committer | tb <> | 2023-04-21 06:11:56 +0000 |
commit | 35d651b970e9882e23ef31f89b2b50a4535956b3 (patch) | |
tree | dd453e919491a22cb8988e2c5a8ed5db28eaa684 /src/lib/libcrypto/x509/x509_enum.c | |
parent | af98f5cdbc5f574e1562f0b8b599d38cbeb1f6ac (diff) | |
download | openbsd-35d651b970e9882e23ef31f89b2b50a4535956b3.tar.gz openbsd-35d651b970e9882e23ef31f89b2b50a4535956b3.tar.bz2 openbsd-35d651b970e9882e23ef31f89b2b50a4535956b3.zip |
Move the CRL reason method into x509_bitst.c
The CRL extension handler is completely misplaced in x509_enum.c.
Move it to x509_bitst.c until we find a better home for it. This
way it is next to the other two extension methods that have the
extra usr_data contortion.
Diffstat (limited to 'src/lib/libcrypto/x509/x509_enum.c')
-rw-r--r-- | src/lib/libcrypto/x509/x509_enum.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/src/lib/libcrypto/x509/x509_enum.c b/src/lib/libcrypto/x509/x509_enum.c index 0f3bfea4c7..9e8a29155a 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.6 2023/04/21 06:07:10 tb Exp $ */ | 1 | /* $OpenBSD: x509_enum.c,v 1.7 2023/04/21 06:11:56 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 | */ |
@@ -61,34 +61,3 @@ | |||
61 | 61 | ||
62 | #include <openssl/asn1.h> | 62 | #include <openssl/asn1.h> |
63 | #include <openssl/x509v3.h> | 63 | #include <openssl/x509v3.h> |
64 | |||
65 | static BIT_STRING_BITNAME crl_reasons[] = { | ||
66 | {CRL_REASON_UNSPECIFIED, "Unspecified", "unspecified"}, | ||
67 | {CRL_REASON_KEY_COMPROMISE, "Key Compromise", "keyCompromise"}, | ||
68 | {CRL_REASON_CA_COMPROMISE, "CA Compromise", "CACompromise"}, | ||
69 | {CRL_REASON_AFFILIATION_CHANGED, "Affiliation Changed", "affiliationChanged"}, | ||
70 | {CRL_REASON_SUPERSEDED, "Superseded", "superseded"}, | ||
71 | {CRL_REASON_CESSATION_OF_OPERATION, "Cessation Of Operation", "cessationOfOperation"}, | ||
72 | {CRL_REASON_CERTIFICATE_HOLD, "Certificate Hold", "certificateHold"}, | ||
73 | {CRL_REASON_REMOVE_FROM_CRL, "Remove From CRL", "removeFromCRL"}, | ||
74 | {CRL_REASON_PRIVILEGE_WITHDRAWN, "Privilege Withdrawn", "privilegeWithdrawn"}, | ||
75 | {CRL_REASON_AA_COMPROMISE, "AA Compromise", "AACompromise"}, | ||
76 | {-1, NULL, NULL} | ||
77 | }; | ||
78 | |||
79 | const X509V3_EXT_METHOD v3_crl_reason = { | ||
80 | .ext_nid = NID_crl_reason, | ||
81 | .ext_flags = 0, | ||
82 | .it = &ASN1_ENUMERATED_it, | ||
83 | .ext_new = NULL, | ||
84 | .ext_free = NULL, | ||
85 | .d2i = NULL, | ||
86 | .i2d = NULL, | ||
87 | .i2s = (X509V3_EXT_I2S)i2s_ASN1_ENUMERATED_TABLE, | ||
88 | .s2i = NULL, | ||
89 | .i2v = NULL, | ||
90 | .v2i = NULL, | ||
91 | .i2r = NULL, | ||
92 | .r2i = NULL, | ||
93 | .usr_data = crl_reasons, | ||
94 | }; | ||