1 //! A collection of numerical identifiers for OpenSSL objects.
2 use libc::{c_char, c_int};
3 
4 use std::ffi::CStr;
5 use std::str;
6 
7 use crate::cvt_p;
8 use crate::error::ErrorStack;
9 
10 /// The digest and public-key algorithms associated with a signature.
11 pub struct SignatureAlgorithms {
12     /// The signature's digest.
13     ///
14     /// If the signature does not specify a digest, this will be `NID::UNDEF`.
15     pub digest: Nid,
16 
17     /// The signature's public-key.
18     pub pkey: Nid,
19 }
20 
21 /// A numerical identifier for an OpenSSL object.
22 ///
23 /// Objects in OpenSSL can have a short name, a long name, and
24 /// a numerical identifier (NID). For convenience, objects
25 /// are usually represented in source code using these numeric
26 /// identifiers.
27 ///
28 /// Users should generally not need to create new `Nid`s.
29 ///
30 /// # Examples
31 ///
32 /// To view the integer representation of a `Nid`:
33 ///
34 /// ```
35 /// use openssl::nid::Nid;
36 ///
37 /// assert!(Nid::AES_256_GCM.as_raw() == 901);
38 /// ```
39 ///
40 /// # External Documentation
41 ///
42 /// The following documentation provides context about `Nid`s and their usage
43 /// in OpenSSL.
44 ///
45 /// - [Obj_nid2obj](https://www.openssl.org/docs/man1.1.0/crypto/OBJ_create.html)
46 #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
47 pub struct Nid(c_int);
48 
49 #[allow(non_snake_case)]
50 impl Nid {
51     /// Create a `Nid` from an integer representation.
from_raw(raw: c_int) -> Nid52     pub fn from_raw(raw: c_int) -> Nid {
53         Nid(raw)
54     }
55 
56     /// Return the integer representation of a `Nid`.
57     #[allow(clippy::trivially_copy_pass_by_ref)]
as_raw(&self) -> c_int58     pub fn as_raw(&self) -> c_int {
59         self.0
60     }
61 
62     /// Returns the `Nid`s of the digest and public key algorithms associated with a signature ID.
63     ///
64     /// This corresponds to `OBJ_find_sigid_algs`.
65     #[allow(clippy::trivially_copy_pass_by_ref)]
signature_algorithms(&self) -> Option<SignatureAlgorithms>66     pub fn signature_algorithms(&self) -> Option<SignatureAlgorithms> {
67         unsafe {
68             let mut digest = 0;
69             let mut pkey = 0;
70             if ffi::OBJ_find_sigid_algs(self.0, &mut digest, &mut pkey) == 1 {
71                 Some(SignatureAlgorithms {
72                     digest: Nid(digest),
73                     pkey: Nid(pkey),
74                 })
75             } else {
76                 None
77             }
78         }
79     }
80 
81     /// Return the string representation of a `Nid` (long)
82     /// This corresponds to [`OBJ_nid2ln`]
83     ///
84     /// [`OBJ_nid2ln`]: https://www.openssl.org/docs/man1.1.0/crypto/OBJ_nid2ln.html
85     #[allow(clippy::trivially_copy_pass_by_ref)]
long_name(&self) -> Result<&'static str, ErrorStack>86     pub fn long_name(&self) -> Result<&'static str, ErrorStack> {
87         unsafe {
88             cvt_p(ffi::OBJ_nid2ln(self.0) as *mut c_char)
89                 .map(|nameptr| str::from_utf8(CStr::from_ptr(nameptr).to_bytes()).unwrap())
90         }
91     }
92 
93     /// Return the string representation of a `Nid` (short)
94     /// This corresponds to [`OBJ_nid2sn`]
95     ///
96     /// [`OBJ_nid2sn`]: https://www.openssl.org/docs/man1.1.0/crypto/OBJ_nid2sn.html
97     #[allow(clippy::trivially_copy_pass_by_ref)]
short_name(&self) -> Result<&'static str, ErrorStack>98     pub fn short_name(&self) -> Result<&'static str, ErrorStack> {
99         unsafe {
100             cvt_p(ffi::OBJ_nid2sn(self.0) as *mut c_char)
101                 .map(|nameptr| str::from_utf8(CStr::from_ptr(nameptr).to_bytes()).unwrap())
102         }
103     }
104 
105     pub const UNDEF: Nid = Nid(ffi::NID_undef);
106     pub const ITU_T: Nid = Nid(ffi::NID_itu_t);
107     pub const CCITT: Nid = Nid(ffi::NID_ccitt);
108     pub const ISO: Nid = Nid(ffi::NID_iso);
109     pub const JOINT_ISO_ITU_T: Nid = Nid(ffi::NID_joint_iso_itu_t);
110     pub const JOINT_ISO_CCITT: Nid = Nid(ffi::NID_joint_iso_ccitt);
111     pub const MEMBER_BODY: Nid = Nid(ffi::NID_member_body);
112     pub const IDENTIFIED_ORGANIZATION: Nid = Nid(ffi::NID_identified_organization);
113     pub const HMAC_MD5: Nid = Nid(ffi::NID_hmac_md5);
114     pub const HMAC_SHA1: Nid = Nid(ffi::NID_hmac_sha1);
115     pub const CERTICOM_ARC: Nid = Nid(ffi::NID_certicom_arc);
116     pub const INTERNATIONAL_ORGANIZATIONS: Nid = Nid(ffi::NID_international_organizations);
117     pub const WAP: Nid = Nid(ffi::NID_wap);
118     pub const WAP_WSG: Nid = Nid(ffi::NID_wap_wsg);
119     pub const SELECTED_ATTRIBUTE_TYPES: Nid = Nid(ffi::NID_selected_attribute_types);
120     pub const CLEARANCE: Nid = Nid(ffi::NID_clearance);
121     pub const ISO_US: Nid = Nid(ffi::NID_ISO_US);
122     pub const X9_57: Nid = Nid(ffi::NID_X9_57);
123     pub const X9CM: Nid = Nid(ffi::NID_X9cm);
124     pub const DSA: Nid = Nid(ffi::NID_dsa);
125     pub const DSAWITHSHA1: Nid = Nid(ffi::NID_dsaWithSHA1);
126     pub const ANSI_X9_62: Nid = Nid(ffi::NID_ansi_X9_62);
127     pub const X9_62_PRIME_FIELD: Nid = Nid(ffi::NID_X9_62_prime_field);
128     pub const X9_62_CHARACTERISTIC_TWO_FIELD: Nid = Nid(ffi::NID_X9_62_characteristic_two_field);
129     pub const X9_62_ID_CHARACTERISTIC_TWO_BASIS: Nid =
130         Nid(ffi::NID_X9_62_id_characteristic_two_basis);
131     pub const X9_62_ONBASIS: Nid = Nid(ffi::NID_X9_62_onBasis);
132     pub const X9_62_TPBASIS: Nid = Nid(ffi::NID_X9_62_tpBasis);
133     pub const X9_62_PPBASIS: Nid = Nid(ffi::NID_X9_62_ppBasis);
134     pub const X9_62_ID_ECPUBLICKEY: Nid = Nid(ffi::NID_X9_62_id_ecPublicKey);
135     pub const X9_62_C2PNB163V1: Nid = Nid(ffi::NID_X9_62_c2pnb163v1);
136     pub const X9_62_C2PNB163V2: Nid = Nid(ffi::NID_X9_62_c2pnb163v2);
137     pub const X9_62_C2PNB163V3: Nid = Nid(ffi::NID_X9_62_c2pnb163v3);
138     pub const X9_62_C2PNB176V1: Nid = Nid(ffi::NID_X9_62_c2pnb176v1);
139     pub const X9_62_C2TNB191V1: Nid = Nid(ffi::NID_X9_62_c2tnb191v1);
140     pub const X9_62_C2TNB191V2: Nid = Nid(ffi::NID_X9_62_c2tnb191v2);
141     pub const X9_62_C2TNB191V3: Nid = Nid(ffi::NID_X9_62_c2tnb191v3);
142     pub const X9_62_C2ONB191V4: Nid = Nid(ffi::NID_X9_62_c2onb191v4);
143     pub const X9_62_C2ONB191V5: Nid = Nid(ffi::NID_X9_62_c2onb191v5);
144     pub const X9_62_C2PNB208W1: Nid = Nid(ffi::NID_X9_62_c2pnb208w1);
145     pub const X9_62_C2TNB239V1: Nid = Nid(ffi::NID_X9_62_c2tnb239v1);
146     pub const X9_62_C2TNB239V2: Nid = Nid(ffi::NID_X9_62_c2tnb239v2);
147     pub const X9_62_C2TNB239V3: Nid = Nid(ffi::NID_X9_62_c2tnb239v3);
148     pub const X9_62_C2ONB239V4: Nid = Nid(ffi::NID_X9_62_c2onb239v4);
149     pub const X9_62_C2ONB239V5: Nid = Nid(ffi::NID_X9_62_c2onb239v5);
150     pub const X9_62_C2PNB272W1: Nid = Nid(ffi::NID_X9_62_c2pnb272w1);
151     pub const X9_62_C2PNB304W1: Nid = Nid(ffi::NID_X9_62_c2pnb304w1);
152     pub const X9_62_C2TNB359V1: Nid = Nid(ffi::NID_X9_62_c2tnb359v1);
153     pub const X9_62_C2PNB368W1: Nid = Nid(ffi::NID_X9_62_c2pnb368w1);
154     pub const X9_62_C2TNB431R1: Nid = Nid(ffi::NID_X9_62_c2tnb431r1);
155     pub const X9_62_PRIME192V1: Nid = Nid(ffi::NID_X9_62_prime192v1);
156     pub const X9_62_PRIME192V2: Nid = Nid(ffi::NID_X9_62_prime192v2);
157     pub const X9_62_PRIME192V3: Nid = Nid(ffi::NID_X9_62_prime192v3);
158     pub const X9_62_PRIME239V1: Nid = Nid(ffi::NID_X9_62_prime239v1);
159     pub const X9_62_PRIME239V2: Nid = Nid(ffi::NID_X9_62_prime239v2);
160     pub const X9_62_PRIME239V3: Nid = Nid(ffi::NID_X9_62_prime239v3);
161     pub const X9_62_PRIME256V1: Nid = Nid(ffi::NID_X9_62_prime256v1);
162     pub const ECDSA_WITH_SHA1: Nid = Nid(ffi::NID_ecdsa_with_SHA1);
163     pub const ECDSA_WITH_RECOMMENDED: Nid = Nid(ffi::NID_ecdsa_with_Recommended);
164     pub const ECDSA_WITH_SPECIFIED: Nid = Nid(ffi::NID_ecdsa_with_Specified);
165     pub const ECDSA_WITH_SHA224: Nid = Nid(ffi::NID_ecdsa_with_SHA224);
166     pub const ECDSA_WITH_SHA256: Nid = Nid(ffi::NID_ecdsa_with_SHA256);
167     pub const ECDSA_WITH_SHA384: Nid = Nid(ffi::NID_ecdsa_with_SHA384);
168     pub const ECDSA_WITH_SHA512: Nid = Nid(ffi::NID_ecdsa_with_SHA512);
169     pub const SECP112R1: Nid = Nid(ffi::NID_secp112r1);
170     pub const SECP112R2: Nid = Nid(ffi::NID_secp112r2);
171     pub const SECP128R1: Nid = Nid(ffi::NID_secp128r1);
172     pub const SECP128R2: Nid = Nid(ffi::NID_secp128r2);
173     pub const SECP160K1: Nid = Nid(ffi::NID_secp160k1);
174     pub const SECP160R1: Nid = Nid(ffi::NID_secp160r1);
175     pub const SECP160R2: Nid = Nid(ffi::NID_secp160r2);
176     pub const SECP192K1: Nid = Nid(ffi::NID_secp192k1);
177     pub const SECP224K1: Nid = Nid(ffi::NID_secp224k1);
178     pub const SECP224R1: Nid = Nid(ffi::NID_secp224r1);
179     pub const SECP256K1: Nid = Nid(ffi::NID_secp256k1);
180     pub const SECP384R1: Nid = Nid(ffi::NID_secp384r1);
181     pub const SECP521R1: Nid = Nid(ffi::NID_secp521r1);
182     pub const SECT113R1: Nid = Nid(ffi::NID_sect113r1);
183     pub const SECT113R2: Nid = Nid(ffi::NID_sect113r2);
184     pub const SECT131R1: Nid = Nid(ffi::NID_sect131r1);
185     pub const SECT131R2: Nid = Nid(ffi::NID_sect131r2);
186     pub const SECT163K1: Nid = Nid(ffi::NID_sect163k1);
187     pub const SECT163R1: Nid = Nid(ffi::NID_sect163r1);
188     pub const SECT163R2: Nid = Nid(ffi::NID_sect163r2);
189     pub const SECT193R1: Nid = Nid(ffi::NID_sect193r1);
190     pub const SECT193R2: Nid = Nid(ffi::NID_sect193r2);
191     pub const SECT233K1: Nid = Nid(ffi::NID_sect233k1);
192     pub const SECT233R1: Nid = Nid(ffi::NID_sect233r1);
193     pub const SECT239K1: Nid = Nid(ffi::NID_sect239k1);
194     pub const SECT283K1: Nid = Nid(ffi::NID_sect283k1);
195     pub const SECT283R1: Nid = Nid(ffi::NID_sect283r1);
196     pub const SECT409K1: Nid = Nid(ffi::NID_sect409k1);
197     pub const SECT409R1: Nid = Nid(ffi::NID_sect409r1);
198     pub const SECT571K1: Nid = Nid(ffi::NID_sect571k1);
199     pub const SECT571R1: Nid = Nid(ffi::NID_sect571r1);
200     pub const WAP_WSG_IDM_ECID_WTLS1: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls1);
201     pub const WAP_WSG_IDM_ECID_WTLS3: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls3);
202     pub const WAP_WSG_IDM_ECID_WTLS4: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls4);
203     pub const WAP_WSG_IDM_ECID_WTLS5: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls5);
204     pub const WAP_WSG_IDM_ECID_WTLS6: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls6);
205     pub const WAP_WSG_IDM_ECID_WTLS7: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls7);
206     pub const WAP_WSG_IDM_ECID_WTLS8: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls8);
207     pub const WAP_WSG_IDM_ECID_WTLS9: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls9);
208     pub const WAP_WSG_IDM_ECID_WTLS10: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls10);
209     pub const WAP_WSG_IDM_ECID_WTLS11: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls11);
210     pub const WAP_WSG_IDM_ECID_WTLS12: Nid = Nid(ffi::NID_wap_wsg_idm_ecid_wtls12);
211     pub const CAST5_CBC: Nid = Nid(ffi::NID_cast5_cbc);
212     pub const CAST5_ECB: Nid = Nid(ffi::NID_cast5_ecb);
213     pub const CAST5_CFB64: Nid = Nid(ffi::NID_cast5_cfb64);
214     pub const CAST5_OFB64: Nid = Nid(ffi::NID_cast5_ofb64);
215     pub const PBEWITHMD5ANDCAST5_CBC: Nid = Nid(ffi::NID_pbeWithMD5AndCast5_CBC);
216     pub const ID_PASSWORDBASEDMAC: Nid = Nid(ffi::NID_id_PasswordBasedMAC);
217     pub const ID_DHBASEDMAC: Nid = Nid(ffi::NID_id_DHBasedMac);
218     pub const RSADSI: Nid = Nid(ffi::NID_rsadsi);
219     pub const PKCS: Nid = Nid(ffi::NID_pkcs);
220     pub const PKCS1: Nid = Nid(ffi::NID_pkcs1);
221     pub const RSAENCRYPTION: Nid = Nid(ffi::NID_rsaEncryption);
222     pub const MD2WITHRSAENCRYPTION: Nid = Nid(ffi::NID_md2WithRSAEncryption);
223     pub const MD4WITHRSAENCRYPTION: Nid = Nid(ffi::NID_md4WithRSAEncryption);
224     pub const MD5WITHRSAENCRYPTION: Nid = Nid(ffi::NID_md5WithRSAEncryption);
225     pub const SHA1WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha1WithRSAEncryption);
226     pub const RSAESOAEP: Nid = Nid(ffi::NID_rsaesOaep);
227     pub const MGF1: Nid = Nid(ffi::NID_mgf1);
228     pub const RSASSAPSS: Nid = Nid(ffi::NID_rsassaPss);
229     pub const SHA256WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha256WithRSAEncryption);
230     pub const SHA384WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha384WithRSAEncryption);
231     pub const SHA512WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha512WithRSAEncryption);
232     pub const SHA224WITHRSAENCRYPTION: Nid = Nid(ffi::NID_sha224WithRSAEncryption);
233     pub const PKCS3: Nid = Nid(ffi::NID_pkcs3);
234     pub const DHKEYAGREEMENT: Nid = Nid(ffi::NID_dhKeyAgreement);
235     pub const PKCS5: Nid = Nid(ffi::NID_pkcs5);
236     pub const PBEWITHMD2ANDDES_CBC: Nid = Nid(ffi::NID_pbeWithMD2AndDES_CBC);
237     pub const PBEWITHMD5ANDDES_CBC: Nid = Nid(ffi::NID_pbeWithMD5AndDES_CBC);
238     pub const PBEWITHMD2ANDRC2_CBC: Nid = Nid(ffi::NID_pbeWithMD2AndRC2_CBC);
239     pub const PBEWITHMD5ANDRC2_CBC: Nid = Nid(ffi::NID_pbeWithMD5AndRC2_CBC);
240     pub const PBEWITHSHA1ANDDES_CBC: Nid = Nid(ffi::NID_pbeWithSHA1AndDES_CBC);
241     pub const PBEWITHSHA1ANDRC2_CBC: Nid = Nid(ffi::NID_pbeWithSHA1AndRC2_CBC);
242     pub const ID_PBKDF2: Nid = Nid(ffi::NID_id_pbkdf2);
243     pub const PBES2: Nid = Nid(ffi::NID_pbes2);
244     pub const PBMAC1: Nid = Nid(ffi::NID_pbmac1);
245     pub const PKCS7: Nid = Nid(ffi::NID_pkcs7);
246     pub const PKCS7_DATA: Nid = Nid(ffi::NID_pkcs7_data);
247     pub const PKCS7_SIGNED: Nid = Nid(ffi::NID_pkcs7_signed);
248     pub const PKCS7_ENVELOPED: Nid = Nid(ffi::NID_pkcs7_enveloped);
249     pub const PKCS7_SIGNEDANDENVELOPED: Nid = Nid(ffi::NID_pkcs7_signedAndEnveloped);
250     pub const PKCS7_DIGEST: Nid = Nid(ffi::NID_pkcs7_digest);
251     pub const PKCS7_ENCRYPTED: Nid = Nid(ffi::NID_pkcs7_encrypted);
252     pub const PKCS9: Nid = Nid(ffi::NID_pkcs9);
253     pub const PKCS9_EMAILADDRESS: Nid = Nid(ffi::NID_pkcs9_emailAddress);
254     pub const PKCS9_UNSTRUCTUREDNAME: Nid = Nid(ffi::NID_pkcs9_unstructuredName);
255     pub const PKCS9_CONTENTTYPE: Nid = Nid(ffi::NID_pkcs9_contentType);
256     pub const PKCS9_MESSAGEDIGEST: Nid = Nid(ffi::NID_pkcs9_messageDigest);
257     pub const PKCS9_SIGNINGTIME: Nid = Nid(ffi::NID_pkcs9_signingTime);
258     pub const PKCS9_COUNTERSIGNATURE: Nid = Nid(ffi::NID_pkcs9_countersignature);
259     pub const PKCS9_CHALLENGEPASSWORD: Nid = Nid(ffi::NID_pkcs9_challengePassword);
260     pub const PKCS9_UNSTRUCTUREDADDRESS: Nid = Nid(ffi::NID_pkcs9_unstructuredAddress);
261     pub const PKCS9_EXTCERTATTRIBUTES: Nid = Nid(ffi::NID_pkcs9_extCertAttributes);
262     pub const EXT_REQ: Nid = Nid(ffi::NID_ext_req);
263     pub const SMIMECAPABILITIES: Nid = Nid(ffi::NID_SMIMECapabilities);
264     pub const SMIME: Nid = Nid(ffi::NID_SMIME);
265     pub const ID_SMIME_MOD: Nid = Nid(ffi::NID_id_smime_mod);
266     pub const ID_SMIME_CT: Nid = Nid(ffi::NID_id_smime_ct);
267     pub const ID_SMIME_AA: Nid = Nid(ffi::NID_id_smime_aa);
268     pub const ID_SMIME_ALG: Nid = Nid(ffi::NID_id_smime_alg);
269     pub const ID_SMIME_CD: Nid = Nid(ffi::NID_id_smime_cd);
270     pub const ID_SMIME_SPQ: Nid = Nid(ffi::NID_id_smime_spq);
271     pub const ID_SMIME_CTI: Nid = Nid(ffi::NID_id_smime_cti);
272     pub const ID_SMIME_MOD_CMS: Nid = Nid(ffi::NID_id_smime_mod_cms);
273     pub const ID_SMIME_MOD_ESS: Nid = Nid(ffi::NID_id_smime_mod_ess);
274     pub const ID_SMIME_MOD_OID: Nid = Nid(ffi::NID_id_smime_mod_oid);
275     pub const ID_SMIME_MOD_MSG_V3: Nid = Nid(ffi::NID_id_smime_mod_msg_v3);
276     pub const ID_SMIME_MOD_ETS_ESIGNATURE_88: Nid = Nid(ffi::NID_id_smime_mod_ets_eSignature_88);
277     pub const ID_SMIME_MOD_ETS_ESIGNATURE_97: Nid = Nid(ffi::NID_id_smime_mod_ets_eSignature_97);
278     pub const ID_SMIME_MOD_ETS_ESIGPOLICY_88: Nid = Nid(ffi::NID_id_smime_mod_ets_eSigPolicy_88);
279     pub const ID_SMIME_MOD_ETS_ESIGPOLICY_97: Nid = Nid(ffi::NID_id_smime_mod_ets_eSigPolicy_97);
280     pub const ID_SMIME_CT_RECEIPT: Nid = Nid(ffi::NID_id_smime_ct_receipt);
281     pub const ID_SMIME_CT_AUTHDATA: Nid = Nid(ffi::NID_id_smime_ct_authData);
282     pub const ID_SMIME_CT_PUBLISHCERT: Nid = Nid(ffi::NID_id_smime_ct_publishCert);
283     pub const ID_SMIME_CT_TSTINFO: Nid = Nid(ffi::NID_id_smime_ct_TSTInfo);
284     pub const ID_SMIME_CT_TDTINFO: Nid = Nid(ffi::NID_id_smime_ct_TDTInfo);
285     pub const ID_SMIME_CT_CONTENTINFO: Nid = Nid(ffi::NID_id_smime_ct_contentInfo);
286     pub const ID_SMIME_CT_DVCSREQUESTDATA: Nid = Nid(ffi::NID_id_smime_ct_DVCSRequestData);
287     pub const ID_SMIME_CT_DVCSRESPONSEDATA: Nid = Nid(ffi::NID_id_smime_ct_DVCSResponseData);
288     pub const ID_SMIME_CT_COMPRESSEDDATA: Nid = Nid(ffi::NID_id_smime_ct_compressedData);
289     pub const ID_CT_ASCIITEXTWITHCRLF: Nid = Nid(ffi::NID_id_ct_asciiTextWithCRLF);
290     pub const ID_SMIME_AA_RECEIPTREQUEST: Nid = Nid(ffi::NID_id_smime_aa_receiptRequest);
291     pub const ID_SMIME_AA_SECURITYLABEL: Nid = Nid(ffi::NID_id_smime_aa_securityLabel);
292     pub const ID_SMIME_AA_MLEXPANDHISTORY: Nid = Nid(ffi::NID_id_smime_aa_mlExpandHistory);
293     pub const ID_SMIME_AA_CONTENTHINT: Nid = Nid(ffi::NID_id_smime_aa_contentHint);
294     pub const ID_SMIME_AA_MSGSIGDIGEST: Nid = Nid(ffi::NID_id_smime_aa_msgSigDigest);
295     pub const ID_SMIME_AA_ENCAPCONTENTTYPE: Nid = Nid(ffi::NID_id_smime_aa_encapContentType);
296     pub const ID_SMIME_AA_CONTENTIDENTIFIER: Nid = Nid(ffi::NID_id_smime_aa_contentIdentifier);
297     pub const ID_SMIME_AA_MACVALUE: Nid = Nid(ffi::NID_id_smime_aa_macValue);
298     pub const ID_SMIME_AA_EQUIVALENTLABELS: Nid = Nid(ffi::NID_id_smime_aa_equivalentLabels);
299     pub const ID_SMIME_AA_CONTENTREFERENCE: Nid = Nid(ffi::NID_id_smime_aa_contentReference);
300     pub const ID_SMIME_AA_ENCRYPKEYPREF: Nid = Nid(ffi::NID_id_smime_aa_encrypKeyPref);
301     pub const ID_SMIME_AA_SIGNINGCERTIFICATE: Nid = Nid(ffi::NID_id_smime_aa_signingCertificate);
302     pub const ID_SMIME_AA_SMIMEENCRYPTCERTS: Nid = Nid(ffi::NID_id_smime_aa_smimeEncryptCerts);
303     pub const ID_SMIME_AA_TIMESTAMPTOKEN: Nid = Nid(ffi::NID_id_smime_aa_timeStampToken);
304     pub const ID_SMIME_AA_ETS_SIGPOLICYID: Nid = Nid(ffi::NID_id_smime_aa_ets_sigPolicyId);
305     pub const ID_SMIME_AA_ETS_COMMITMENTTYPE: Nid = Nid(ffi::NID_id_smime_aa_ets_commitmentType);
306     pub const ID_SMIME_AA_ETS_SIGNERLOCATION: Nid = Nid(ffi::NID_id_smime_aa_ets_signerLocation);
307     pub const ID_SMIME_AA_ETS_SIGNERATTR: Nid = Nid(ffi::NID_id_smime_aa_ets_signerAttr);
308     pub const ID_SMIME_AA_ETS_OTHERSIGCERT: Nid = Nid(ffi::NID_id_smime_aa_ets_otherSigCert);
309     pub const ID_SMIME_AA_ETS_CONTENTTIMESTAMP: Nid =
310         Nid(ffi::NID_id_smime_aa_ets_contentTimestamp);
311     pub const ID_SMIME_AA_ETS_CERTIFICATEREFS: Nid = Nid(ffi::NID_id_smime_aa_ets_CertificateRefs);
312     pub const ID_SMIME_AA_ETS_REVOCATIONREFS: Nid = Nid(ffi::NID_id_smime_aa_ets_RevocationRefs);
313     pub const ID_SMIME_AA_ETS_CERTVALUES: Nid = Nid(ffi::NID_id_smime_aa_ets_certValues);
314     pub const ID_SMIME_AA_ETS_REVOCATIONVALUES: Nid =
315         Nid(ffi::NID_id_smime_aa_ets_revocationValues);
316     pub const ID_SMIME_AA_ETS_ESCTIMESTAMP: Nid = Nid(ffi::NID_id_smime_aa_ets_escTimeStamp);
317     pub const ID_SMIME_AA_ETS_CERTCRLTIMESTAMP: Nid =
318         Nid(ffi::NID_id_smime_aa_ets_certCRLTimestamp);
319     pub const ID_SMIME_AA_ETS_ARCHIVETIMESTAMP: Nid =
320         Nid(ffi::NID_id_smime_aa_ets_archiveTimeStamp);
321     pub const ID_SMIME_AA_SIGNATURETYPE: Nid = Nid(ffi::NID_id_smime_aa_signatureType);
322     pub const ID_SMIME_AA_DVCS_DVC: Nid = Nid(ffi::NID_id_smime_aa_dvcs_dvc);
323     pub const ID_SMIME_ALG_ESDHWITH3DES: Nid = Nid(ffi::NID_id_smime_alg_ESDHwith3DES);
324     pub const ID_SMIME_ALG_ESDHWITHRC2: Nid = Nid(ffi::NID_id_smime_alg_ESDHwithRC2);
325     pub const ID_SMIME_ALG_3DESWRAP: Nid = Nid(ffi::NID_id_smime_alg_3DESwrap);
326     pub const ID_SMIME_ALG_RC2WRAP: Nid = Nid(ffi::NID_id_smime_alg_RC2wrap);
327     pub const ID_SMIME_ALG_ESDH: Nid = Nid(ffi::NID_id_smime_alg_ESDH);
328     pub const ID_SMIME_ALG_CMS3DESWRAP: Nid = Nid(ffi::NID_id_smime_alg_CMS3DESwrap);
329     pub const ID_SMIME_ALG_CMSRC2WRAP: Nid = Nid(ffi::NID_id_smime_alg_CMSRC2wrap);
330     pub const ID_ALG_PWRI_KEK: Nid = Nid(ffi::NID_id_alg_PWRI_KEK);
331     pub const ID_SMIME_CD_LDAP: Nid = Nid(ffi::NID_id_smime_cd_ldap);
332     pub const ID_SMIME_SPQ_ETS_SQT_URI: Nid = Nid(ffi::NID_id_smime_spq_ets_sqt_uri);
333     pub const ID_SMIME_SPQ_ETS_SQT_UNOTICE: Nid = Nid(ffi::NID_id_smime_spq_ets_sqt_unotice);
334     pub const ID_SMIME_CTI_ETS_PROOFOFORIGIN: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfOrigin);
335     pub const ID_SMIME_CTI_ETS_PROOFOFRECEIPT: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfReceipt);
336     pub const ID_SMIME_CTI_ETS_PROOFOFDELIVERY: Nid =
337         Nid(ffi::NID_id_smime_cti_ets_proofOfDelivery);
338     pub const ID_SMIME_CTI_ETS_PROOFOFSENDER: Nid = Nid(ffi::NID_id_smime_cti_ets_proofOfSender);
339     pub const ID_SMIME_CTI_ETS_PROOFOFAPPROVAL: Nid =
340         Nid(ffi::NID_id_smime_cti_ets_proofOfApproval);
341     pub const ID_SMIME_CTI_ETS_PROOFOFCREATION: Nid =
342         Nid(ffi::NID_id_smime_cti_ets_proofOfCreation);
343     pub const FRIENDLYNAME: Nid = Nid(ffi::NID_friendlyName);
344     pub const LOCALKEYID: Nid = Nid(ffi::NID_localKeyID);
345     pub const MS_CSP_NAME: Nid = Nid(ffi::NID_ms_csp_name);
346     pub const LOCALKEYSET: Nid = Nid(ffi::NID_LocalKeySet);
347     pub const X509CERTIFICATE: Nid = Nid(ffi::NID_x509Certificate);
348     pub const SDSICERTIFICATE: Nid = Nid(ffi::NID_sdsiCertificate);
349     pub const X509CRL: Nid = Nid(ffi::NID_x509Crl);
350     pub const PBE_WITHSHA1AND128BITRC4: Nid = Nid(ffi::NID_pbe_WithSHA1And128BitRC4);
351     pub const PBE_WITHSHA1AND40BITRC4: Nid = Nid(ffi::NID_pbe_WithSHA1And40BitRC4);
352     pub const PBE_WITHSHA1AND3_KEY_TRIPLEDES_CBC: Nid =
353         Nid(ffi::NID_pbe_WithSHA1And3_Key_TripleDES_CBC);
354     pub const PBE_WITHSHA1AND2_KEY_TRIPLEDES_CBC: Nid =
355         Nid(ffi::NID_pbe_WithSHA1And2_Key_TripleDES_CBC);
356     pub const PBE_WITHSHA1AND128BITRC2_CBC: Nid = Nid(ffi::NID_pbe_WithSHA1And128BitRC2_CBC);
357     pub const PBE_WITHSHA1AND40BITRC2_CBC: Nid = Nid(ffi::NID_pbe_WithSHA1And40BitRC2_CBC);
358     pub const KEYBAG: Nid = Nid(ffi::NID_keyBag);
359     pub const PKCS8SHROUDEDKEYBAG: Nid = Nid(ffi::NID_pkcs8ShroudedKeyBag);
360     pub const CERTBAG: Nid = Nid(ffi::NID_certBag);
361     pub const CRLBAG: Nid = Nid(ffi::NID_crlBag);
362     pub const SECRETBAG: Nid = Nid(ffi::NID_secretBag);
363     pub const SAFECONTENTSBAG: Nid = Nid(ffi::NID_safeContentsBag);
364     pub const MD2: Nid = Nid(ffi::NID_md2);
365     pub const MD4: Nid = Nid(ffi::NID_md4);
366     pub const MD5: Nid = Nid(ffi::NID_md5);
367     pub const MD5_SHA1: Nid = Nid(ffi::NID_md5_sha1);
368     pub const HMACWITHMD5: Nid = Nid(ffi::NID_hmacWithMD5);
369     pub const HMACWITHSHA1: Nid = Nid(ffi::NID_hmacWithSHA1);
370     pub const HMACWITHSHA224: Nid = Nid(ffi::NID_hmacWithSHA224);
371     pub const HMACWITHSHA256: Nid = Nid(ffi::NID_hmacWithSHA256);
372     pub const HMACWITHSHA384: Nid = Nid(ffi::NID_hmacWithSHA384);
373     pub const HMACWITHSHA512: Nid = Nid(ffi::NID_hmacWithSHA512);
374     pub const RC2_CBC: Nid = Nid(ffi::NID_rc2_cbc);
375     pub const RC2_ECB: Nid = Nid(ffi::NID_rc2_ecb);
376     pub const RC2_CFB64: Nid = Nid(ffi::NID_rc2_cfb64);
377     pub const RC2_OFB64: Nid = Nid(ffi::NID_rc2_ofb64);
378     pub const RC2_40_CBC: Nid = Nid(ffi::NID_rc2_40_cbc);
379     pub const RC2_64_CBC: Nid = Nid(ffi::NID_rc2_64_cbc);
380     pub const RC4: Nid = Nid(ffi::NID_rc4);
381     pub const RC4_40: Nid = Nid(ffi::NID_rc4_40);
382     pub const DES_EDE3_CBC: Nid = Nid(ffi::NID_des_ede3_cbc);
383     pub const RC5_CBC: Nid = Nid(ffi::NID_rc5_cbc);
384     pub const RC5_ECB: Nid = Nid(ffi::NID_rc5_ecb);
385     pub const RC5_CFB64: Nid = Nid(ffi::NID_rc5_cfb64);
386     pub const RC5_OFB64: Nid = Nid(ffi::NID_rc5_ofb64);
387     pub const MS_EXT_REQ: Nid = Nid(ffi::NID_ms_ext_req);
388     pub const MS_CODE_IND: Nid = Nid(ffi::NID_ms_code_ind);
389     pub const MS_CODE_COM: Nid = Nid(ffi::NID_ms_code_com);
390     pub const MS_CTL_SIGN: Nid = Nid(ffi::NID_ms_ctl_sign);
391     pub const MS_SGC: Nid = Nid(ffi::NID_ms_sgc);
392     pub const MS_EFS: Nid = Nid(ffi::NID_ms_efs);
393     pub const MS_SMARTCARD_LOGIN: Nid = Nid(ffi::NID_ms_smartcard_login);
394     pub const MS_UPN: Nid = Nid(ffi::NID_ms_upn);
395     pub const IDEA_CBC: Nid = Nid(ffi::NID_idea_cbc);
396     pub const IDEA_ECB: Nid = Nid(ffi::NID_idea_ecb);
397     pub const IDEA_CFB64: Nid = Nid(ffi::NID_idea_cfb64);
398     pub const IDEA_OFB64: Nid = Nid(ffi::NID_idea_ofb64);
399     pub const BF_CBC: Nid = Nid(ffi::NID_bf_cbc);
400     pub const BF_ECB: Nid = Nid(ffi::NID_bf_ecb);
401     pub const BF_CFB64: Nid = Nid(ffi::NID_bf_cfb64);
402     pub const BF_OFB64: Nid = Nid(ffi::NID_bf_ofb64);
403     pub const ID_PKIX: Nid = Nid(ffi::NID_id_pkix);
404     pub const ID_PKIX_MOD: Nid = Nid(ffi::NID_id_pkix_mod);
405     pub const ID_PE: Nid = Nid(ffi::NID_id_pe);
406     pub const ID_QT: Nid = Nid(ffi::NID_id_qt);
407     pub const ID_KP: Nid = Nid(ffi::NID_id_kp);
408     pub const ID_IT: Nid = Nid(ffi::NID_id_it);
409     pub const ID_PKIP: Nid = Nid(ffi::NID_id_pkip);
410     pub const ID_ALG: Nid = Nid(ffi::NID_id_alg);
411     pub const ID_CMC: Nid = Nid(ffi::NID_id_cmc);
412     pub const ID_ON: Nid = Nid(ffi::NID_id_on);
413     pub const ID_PDA: Nid = Nid(ffi::NID_id_pda);
414     pub const ID_ACA: Nid = Nid(ffi::NID_id_aca);
415     pub const ID_QCS: Nid = Nid(ffi::NID_id_qcs);
416     pub const ID_CCT: Nid = Nid(ffi::NID_id_cct);
417     pub const ID_PPL: Nid = Nid(ffi::NID_id_ppl);
418     pub const ID_AD: Nid = Nid(ffi::NID_id_ad);
419     pub const ID_PKIX1_EXPLICIT_88: Nid = Nid(ffi::NID_id_pkix1_explicit_88);
420     pub const ID_PKIX1_IMPLICIT_88: Nid = Nid(ffi::NID_id_pkix1_implicit_88);
421     pub const ID_PKIX1_EXPLICIT_93: Nid = Nid(ffi::NID_id_pkix1_explicit_93);
422     pub const ID_PKIX1_IMPLICIT_93: Nid = Nid(ffi::NID_id_pkix1_implicit_93);
423     pub const ID_MOD_CRMF: Nid = Nid(ffi::NID_id_mod_crmf);
424     pub const ID_MOD_CMC: Nid = Nid(ffi::NID_id_mod_cmc);
425     pub const ID_MOD_KEA_PROFILE_88: Nid = Nid(ffi::NID_id_mod_kea_profile_88);
426     pub const ID_MOD_KEA_PROFILE_93: Nid = Nid(ffi::NID_id_mod_kea_profile_93);
427     pub const ID_MOD_CMP: Nid = Nid(ffi::NID_id_mod_cmp);
428     pub const ID_MOD_QUALIFIED_CERT_88: Nid = Nid(ffi::NID_id_mod_qualified_cert_88);
429     pub const ID_MOD_QUALIFIED_CERT_93: Nid = Nid(ffi::NID_id_mod_qualified_cert_93);
430     pub const ID_MOD_ATTRIBUTE_CERT: Nid = Nid(ffi::NID_id_mod_attribute_cert);
431     pub const ID_MOD_TIMESTAMP_PROTOCOL: Nid = Nid(ffi::NID_id_mod_timestamp_protocol);
432     pub const ID_MOD_OCSP: Nid = Nid(ffi::NID_id_mod_ocsp);
433     pub const ID_MOD_DVCS: Nid = Nid(ffi::NID_id_mod_dvcs);
434     pub const ID_MOD_CMP2000: Nid = Nid(ffi::NID_id_mod_cmp2000);
435     pub const INFO_ACCESS: Nid = Nid(ffi::NID_info_access);
436     pub const BIOMETRICINFO: Nid = Nid(ffi::NID_biometricInfo);
437     pub const QCSTATEMENTS: Nid = Nid(ffi::NID_qcStatements);
438     pub const AC_AUDITENTITY: Nid = Nid(ffi::NID_ac_auditEntity);
439     pub const AC_TARGETING: Nid = Nid(ffi::NID_ac_targeting);
440     pub const AACONTROLS: Nid = Nid(ffi::NID_aaControls);
441     pub const SBGP_IPADDRBLOCK: Nid = Nid(ffi::NID_sbgp_ipAddrBlock);
442     pub const SBGP_AUTONOMOUSSYSNUM: Nid = Nid(ffi::NID_sbgp_autonomousSysNum);
443     pub const SBGP_ROUTERIDENTIFIER: Nid = Nid(ffi::NID_sbgp_routerIdentifier);
444     pub const AC_PROXYING: Nid = Nid(ffi::NID_ac_proxying);
445     pub const SINFO_ACCESS: Nid = Nid(ffi::NID_sinfo_access);
446     pub const PROXYCERTINFO: Nid = Nid(ffi::NID_proxyCertInfo);
447     pub const ID_QT_CPS: Nid = Nid(ffi::NID_id_qt_cps);
448     pub const ID_QT_UNOTICE: Nid = Nid(ffi::NID_id_qt_unotice);
449     pub const TEXTNOTICE: Nid = Nid(ffi::NID_textNotice);
450     pub const SERVER_AUTH: Nid = Nid(ffi::NID_server_auth);
451     pub const CLIENT_AUTH: Nid = Nid(ffi::NID_client_auth);
452     pub const CODE_SIGN: Nid = Nid(ffi::NID_code_sign);
453     pub const EMAIL_PROTECT: Nid = Nid(ffi::NID_email_protect);
454     pub const IPSECENDSYSTEM: Nid = Nid(ffi::NID_ipsecEndSystem);
455     pub const IPSECTUNNEL: Nid = Nid(ffi::NID_ipsecTunnel);
456     pub const IPSECUSER: Nid = Nid(ffi::NID_ipsecUser);
457     pub const TIME_STAMP: Nid = Nid(ffi::NID_time_stamp);
458     pub const OCSP_SIGN: Nid = Nid(ffi::NID_OCSP_sign);
459     pub const DVCS: Nid = Nid(ffi::NID_dvcs);
460     pub const ID_IT_CAPROTENCCERT: Nid = Nid(ffi::NID_id_it_caProtEncCert);
461     pub const ID_IT_SIGNKEYPAIRTYPES: Nid = Nid(ffi::NID_id_it_signKeyPairTypes);
462     pub const ID_IT_ENCKEYPAIRTYPES: Nid = Nid(ffi::NID_id_it_encKeyPairTypes);
463     pub const ID_IT_PREFERREDSYMMALG: Nid = Nid(ffi::NID_id_it_preferredSymmAlg);
464     pub const ID_IT_CAKEYUPDATEINFO: Nid = Nid(ffi::NID_id_it_caKeyUpdateInfo);
465     pub const ID_IT_CURRENTCRL: Nid = Nid(ffi::NID_id_it_currentCRL);
466     pub const ID_IT_UNSUPPORTEDOIDS: Nid = Nid(ffi::NID_id_it_unsupportedOIDs);
467     pub const ID_IT_SUBSCRIPTIONREQUEST: Nid = Nid(ffi::NID_id_it_subscriptionRequest);
468     pub const ID_IT_SUBSCRIPTIONRESPONSE: Nid = Nid(ffi::NID_id_it_subscriptionResponse);
469     pub const ID_IT_KEYPAIRPARAMREQ: Nid = Nid(ffi::NID_id_it_keyPairParamReq);
470     pub const ID_IT_KEYPAIRPARAMREP: Nid = Nid(ffi::NID_id_it_keyPairParamRep);
471     pub const ID_IT_REVPASSPHRASE: Nid = Nid(ffi::NID_id_it_revPassphrase);
472     pub const ID_IT_IMPLICITCONFIRM: Nid = Nid(ffi::NID_id_it_implicitConfirm);
473     pub const ID_IT_CONFIRMWAITTIME: Nid = Nid(ffi::NID_id_it_confirmWaitTime);
474     pub const ID_IT_ORIGPKIMESSAGE: Nid = Nid(ffi::NID_id_it_origPKIMessage);
475     pub const ID_IT_SUPPLANGTAGS: Nid = Nid(ffi::NID_id_it_suppLangTags);
476     pub const ID_REGCTRL: Nid = Nid(ffi::NID_id_regCtrl);
477     pub const ID_REGINFO: Nid = Nid(ffi::NID_id_regInfo);
478     pub const ID_REGCTRL_REGTOKEN: Nid = Nid(ffi::NID_id_regCtrl_regToken);
479     pub const ID_REGCTRL_AUTHENTICATOR: Nid = Nid(ffi::NID_id_regCtrl_authenticator);
480     pub const ID_REGCTRL_PKIPUBLICATIONINFO: Nid = Nid(ffi::NID_id_regCtrl_pkiPublicationInfo);
481     pub const ID_REGCTRL_PKIARCHIVEOPTIONS: Nid = Nid(ffi::NID_id_regCtrl_pkiArchiveOptions);
482     pub const ID_REGCTRL_OLDCERTID: Nid = Nid(ffi::NID_id_regCtrl_oldCertID);
483     pub const ID_REGCTRL_PROTOCOLENCRKEY: Nid = Nid(ffi::NID_id_regCtrl_protocolEncrKey);
484     pub const ID_REGINFO_UTF8PAIRS: Nid = Nid(ffi::NID_id_regInfo_utf8Pairs);
485     pub const ID_REGINFO_CERTREQ: Nid = Nid(ffi::NID_id_regInfo_certReq);
486     pub const ID_ALG_DES40: Nid = Nid(ffi::NID_id_alg_des40);
487     pub const ID_ALG_NOSIGNATURE: Nid = Nid(ffi::NID_id_alg_noSignature);
488     pub const ID_ALG_DH_SIG_HMAC_SHA1: Nid = Nid(ffi::NID_id_alg_dh_sig_hmac_sha1);
489     pub const ID_ALG_DH_POP: Nid = Nid(ffi::NID_id_alg_dh_pop);
490     pub const ID_CMC_STATUSINFO: Nid = Nid(ffi::NID_id_cmc_statusInfo);
491     pub const ID_CMC_IDENTIFICATION: Nid = Nid(ffi::NID_id_cmc_identification);
492     pub const ID_CMC_IDENTITYPROOF: Nid = Nid(ffi::NID_id_cmc_identityProof);
493     pub const ID_CMC_DATARETURN: Nid = Nid(ffi::NID_id_cmc_dataReturn);
494     pub const ID_CMC_TRANSACTIONID: Nid = Nid(ffi::NID_id_cmc_transactionId);
495     pub const ID_CMC_SENDERNONCE: Nid = Nid(ffi::NID_id_cmc_senderNonce);
496     pub const ID_CMC_RECIPIENTNONCE: Nid = Nid(ffi::NID_id_cmc_recipientNonce);
497     pub const ID_CMC_ADDEXTENSIONS: Nid = Nid(ffi::NID_id_cmc_addExtensions);
498     pub const ID_CMC_ENCRYPTEDPOP: Nid = Nid(ffi::NID_id_cmc_encryptedPOP);
499     pub const ID_CMC_DECRYPTEDPOP: Nid = Nid(ffi::NID_id_cmc_decryptedPOP);
500     pub const ID_CMC_LRAPOPWITNESS: Nid = Nid(ffi::NID_id_cmc_lraPOPWitness);
501     pub const ID_CMC_GETCERT: Nid = Nid(ffi::NID_id_cmc_getCert);
502     pub const ID_CMC_GETCRL: Nid = Nid(ffi::NID_id_cmc_getCRL);
503     pub const ID_CMC_REVOKEREQUEST: Nid = Nid(ffi::NID_id_cmc_revokeRequest);
504     pub const ID_CMC_REGINFO: Nid = Nid(ffi::NID_id_cmc_regInfo);
505     pub const ID_CMC_RESPONSEINFO: Nid = Nid(ffi::NID_id_cmc_responseInfo);
506     pub const ID_CMC_QUERYPENDING: Nid = Nid(ffi::NID_id_cmc_queryPending);
507     pub const ID_CMC_POPLINKRANDOM: Nid = Nid(ffi::NID_id_cmc_popLinkRandom);
508     pub const ID_CMC_POPLINKWITNESS: Nid = Nid(ffi::NID_id_cmc_popLinkWitness);
509     pub const ID_CMC_CONFIRMCERTACCEPTANCE: Nid = Nid(ffi::NID_id_cmc_confirmCertAcceptance);
510     pub const ID_ON_PERSONALDATA: Nid = Nid(ffi::NID_id_on_personalData);
511     pub const ID_ON_PERMANENTIDENTIFIER: Nid = Nid(ffi::NID_id_on_permanentIdentifier);
512     pub const ID_PDA_DATEOFBIRTH: Nid = Nid(ffi::NID_id_pda_dateOfBirth);
513     pub const ID_PDA_PLACEOFBIRTH: Nid = Nid(ffi::NID_id_pda_placeOfBirth);
514     pub const ID_PDA_GENDER: Nid = Nid(ffi::NID_id_pda_gender);
515     pub const ID_PDA_COUNTRYOFCITIZENSHIP: Nid = Nid(ffi::NID_id_pda_countryOfCitizenship);
516     pub const ID_PDA_COUNTRYOFRESIDENCE: Nid = Nid(ffi::NID_id_pda_countryOfResidence);
517     pub const ID_ACA_AUTHENTICATIONINFO: Nid = Nid(ffi::NID_id_aca_authenticationInfo);
518     pub const ID_ACA_ACCESSIDENTITY: Nid = Nid(ffi::NID_id_aca_accessIdentity);
519     pub const ID_ACA_CHARGINGIDENTITY: Nid = Nid(ffi::NID_id_aca_chargingIdentity);
520     pub const ID_ACA_GROUP: Nid = Nid(ffi::NID_id_aca_group);
521     pub const ID_ACA_ROLE: Nid = Nid(ffi::NID_id_aca_role);
522     pub const ID_ACA_ENCATTRS: Nid = Nid(ffi::NID_id_aca_encAttrs);
523     pub const ID_QCS_PKIXQCSYNTAX_V1: Nid = Nid(ffi::NID_id_qcs_pkixQCSyntax_v1);
524     pub const ID_CCT_CRS: Nid = Nid(ffi::NID_id_cct_crs);
525     pub const ID_CCT_PKIDATA: Nid = Nid(ffi::NID_id_cct_PKIData);
526     pub const ID_CCT_PKIRESPONSE: Nid = Nid(ffi::NID_id_cct_PKIResponse);
527     pub const ID_PPL_ANYLANGUAGE: Nid = Nid(ffi::NID_id_ppl_anyLanguage);
528     pub const ID_PPL_INHERITALL: Nid = Nid(ffi::NID_id_ppl_inheritAll);
529     pub const INDEPENDENT: Nid = Nid(ffi::NID_Independent);
530     pub const AD_OCSP: Nid = Nid(ffi::NID_ad_OCSP);
531     pub const AD_CA_ISSUERS: Nid = Nid(ffi::NID_ad_ca_issuers);
532     pub const AD_TIMESTAMPING: Nid = Nid(ffi::NID_ad_timeStamping);
533     pub const AD_DVCS: Nid = Nid(ffi::NID_ad_dvcs);
534     pub const CAREPOSITORY: Nid = Nid(ffi::NID_caRepository);
535     pub const ID_PKIX_OCSP_BASIC: Nid = Nid(ffi::NID_id_pkix_OCSP_basic);
536     pub const ID_PKIX_OCSP_NONCE: Nid = Nid(ffi::NID_id_pkix_OCSP_Nonce);
537     pub const ID_PKIX_OCSP_CRLID: Nid = Nid(ffi::NID_id_pkix_OCSP_CrlID);
538     pub const ID_PKIX_OCSP_ACCEPTABLERESPONSES: Nid =
539         Nid(ffi::NID_id_pkix_OCSP_acceptableResponses);
540     pub const ID_PKIX_OCSP_NOCHECK: Nid = Nid(ffi::NID_id_pkix_OCSP_noCheck);
541     pub const ID_PKIX_OCSP_ARCHIVECUTOFF: Nid = Nid(ffi::NID_id_pkix_OCSP_archiveCutoff);
542     pub const ID_PKIX_OCSP_SERVICELOCATOR: Nid = Nid(ffi::NID_id_pkix_OCSP_serviceLocator);
543     pub const ID_PKIX_OCSP_EXTENDEDSTATUS: Nid = Nid(ffi::NID_id_pkix_OCSP_extendedStatus);
544     pub const ID_PKIX_OCSP_VALID: Nid = Nid(ffi::NID_id_pkix_OCSP_valid);
545     pub const ID_PKIX_OCSP_PATH: Nid = Nid(ffi::NID_id_pkix_OCSP_path);
546     pub const ID_PKIX_OCSP_TRUSTROOT: Nid = Nid(ffi::NID_id_pkix_OCSP_trustRoot);
547     pub const ALGORITHM: Nid = Nid(ffi::NID_algorithm);
548     pub const MD5WITHRSA: Nid = Nid(ffi::NID_md5WithRSA);
549     pub const DES_ECB: Nid = Nid(ffi::NID_des_ecb);
550     pub const DES_CBC: Nid = Nid(ffi::NID_des_cbc);
551     pub const DES_OFB64: Nid = Nid(ffi::NID_des_ofb64);
552     pub const DES_CFB64: Nid = Nid(ffi::NID_des_cfb64);
553     pub const RSASIGNATURE: Nid = Nid(ffi::NID_rsaSignature);
554     pub const DSA_2: Nid = Nid(ffi::NID_dsa_2);
555     pub const DSAWITHSHA: Nid = Nid(ffi::NID_dsaWithSHA);
556     pub const SHAWITHRSAENCRYPTION: Nid = Nid(ffi::NID_shaWithRSAEncryption);
557     pub const DES_EDE_ECB: Nid = Nid(ffi::NID_des_ede_ecb);
558     pub const DES_EDE3_ECB: Nid = Nid(ffi::NID_des_ede3_ecb);
559     pub const DES_EDE_CBC: Nid = Nid(ffi::NID_des_ede_cbc);
560     pub const DES_EDE_CFB64: Nid = Nid(ffi::NID_des_ede_cfb64);
561     pub const DES_EDE3_CFB64: Nid = Nid(ffi::NID_des_ede3_cfb64);
562     pub const DES_EDE_OFB64: Nid = Nid(ffi::NID_des_ede_ofb64);
563     pub const DES_EDE3_OFB64: Nid = Nid(ffi::NID_des_ede3_ofb64);
564     pub const DESX_CBC: Nid = Nid(ffi::NID_desx_cbc);
565     pub const SHA: Nid = Nid(ffi::NID_sha);
566     pub const SHA1: Nid = Nid(ffi::NID_sha1);
567     pub const DSAWITHSHA1_2: Nid = Nid(ffi::NID_dsaWithSHA1_2);
568     pub const SHA1WITHRSA: Nid = Nid(ffi::NID_sha1WithRSA);
569     pub const RIPEMD160: Nid = Nid(ffi::NID_ripemd160);
570     pub const RIPEMD160WITHRSA: Nid = Nid(ffi::NID_ripemd160WithRSA);
571     pub const SXNET: Nid = Nid(ffi::NID_sxnet);
572     pub const X500: Nid = Nid(ffi::NID_X500);
573     pub const X509: Nid = Nid(ffi::NID_X509);
574     pub const COMMONNAME: Nid = Nid(ffi::NID_commonName);
575     pub const SURNAME: Nid = Nid(ffi::NID_surname);
576     pub const SERIALNUMBER: Nid = Nid(ffi::NID_serialNumber);
577     pub const COUNTRYNAME: Nid = Nid(ffi::NID_countryName);
578     pub const LOCALITYNAME: Nid = Nid(ffi::NID_localityName);
579     pub const STATEORPROVINCENAME: Nid = Nid(ffi::NID_stateOrProvinceName);
580     pub const STREETADDRESS: Nid = Nid(ffi::NID_streetAddress);
581     pub const ORGANIZATIONNAME: Nid = Nid(ffi::NID_organizationName);
582     pub const ORGANIZATIONALUNITNAME: Nid = Nid(ffi::NID_organizationalUnitName);
583     pub const TITLE: Nid = Nid(ffi::NID_title);
584     pub const DESCRIPTION: Nid = Nid(ffi::NID_description);
585     pub const SEARCHGUIDE: Nid = Nid(ffi::NID_searchGuide);
586     pub const BUSINESSCATEGORY: Nid = Nid(ffi::NID_businessCategory);
587     pub const POSTALADDRESS: Nid = Nid(ffi::NID_postalAddress);
588     pub const POSTALCODE: Nid = Nid(ffi::NID_postalCode);
589     pub const POSTOFFICEBOX: Nid = Nid(ffi::NID_postOfficeBox);
590     pub const PHYSICALDELIVERYOFFICENAME: Nid = Nid(ffi::NID_physicalDeliveryOfficeName);
591     pub const TELEPHONENUMBER: Nid = Nid(ffi::NID_telephoneNumber);
592     pub const TELEXNUMBER: Nid = Nid(ffi::NID_telexNumber);
593     pub const TELETEXTERMINALIDENTIFIER: Nid = Nid(ffi::NID_teletexTerminalIdentifier);
594     pub const FACSIMILETELEPHONENUMBER: Nid = Nid(ffi::NID_facsimileTelephoneNumber);
595     pub const X121ADDRESS: Nid = Nid(ffi::NID_x121Address);
596     pub const INTERNATIONALISDNNUMBER: Nid = Nid(ffi::NID_internationaliSDNNumber);
597     pub const REGISTEREDADDRESS: Nid = Nid(ffi::NID_registeredAddress);
598     pub const DESTINATIONINDICATOR: Nid = Nid(ffi::NID_destinationIndicator);
599     pub const PREFERREDDELIVERYMETHOD: Nid = Nid(ffi::NID_preferredDeliveryMethod);
600     pub const PRESENTATIONADDRESS: Nid = Nid(ffi::NID_presentationAddress);
601     pub const SUPPORTEDAPPLICATIONCONTEXT: Nid = Nid(ffi::NID_supportedApplicationContext);
602     pub const MEMBER: Nid = Nid(ffi::NID_member);
603     pub const OWNER: Nid = Nid(ffi::NID_owner);
604     pub const ROLEOCCUPANT: Nid = Nid(ffi::NID_roleOccupant);
605     pub const SEEALSO: Nid = Nid(ffi::NID_seeAlso);
606     pub const USERPASSWORD: Nid = Nid(ffi::NID_userPassword);
607     pub const USERCERTIFICATE: Nid = Nid(ffi::NID_userCertificate);
608     pub const CACERTIFICATE: Nid = Nid(ffi::NID_cACertificate);
609     pub const AUTHORITYREVOCATIONLIST: Nid = Nid(ffi::NID_authorityRevocationList);
610     pub const CERTIFICATEREVOCATIONLIST: Nid = Nid(ffi::NID_certificateRevocationList);
611     pub const CROSSCERTIFICATEPAIR: Nid = Nid(ffi::NID_crossCertificatePair);
612     pub const NAME: Nid = Nid(ffi::NID_name);
613     pub const GIVENNAME: Nid = Nid(ffi::NID_givenName);
614     pub const INITIALS: Nid = Nid(ffi::NID_initials);
615     pub const GENERATIONQUALIFIER: Nid = Nid(ffi::NID_generationQualifier);
616     pub const X500UNIQUEIDENTIFIER: Nid = Nid(ffi::NID_x500UniqueIdentifier);
617     pub const DNQUALIFIER: Nid = Nid(ffi::NID_dnQualifier);
618     pub const ENHANCEDSEARCHGUIDE: Nid = Nid(ffi::NID_enhancedSearchGuide);
619     pub const PROTOCOLINFORMATION: Nid = Nid(ffi::NID_protocolInformation);
620     pub const DISTINGUISHEDNAME: Nid = Nid(ffi::NID_distinguishedName);
621     pub const UNIQUEMEMBER: Nid = Nid(ffi::NID_uniqueMember);
622     pub const HOUSEIDENTIFIER: Nid = Nid(ffi::NID_houseIdentifier);
623     pub const SUPPORTEDALGORITHMS: Nid = Nid(ffi::NID_supportedAlgorithms);
624     pub const DELTAREVOCATIONLIST: Nid = Nid(ffi::NID_deltaRevocationList);
625     pub const DMDNAME: Nid = Nid(ffi::NID_dmdName);
626     pub const PSEUDONYM: Nid = Nid(ffi::NID_pseudonym);
627     pub const ROLE: Nid = Nid(ffi::NID_role);
628     pub const X500ALGORITHMS: Nid = Nid(ffi::NID_X500algorithms);
629     pub const RSA: Nid = Nid(ffi::NID_rsa);
630     pub const MDC2WITHRSA: Nid = Nid(ffi::NID_mdc2WithRSA);
631     pub const MDC2: Nid = Nid(ffi::NID_mdc2);
632     pub const ID_CE: Nid = Nid(ffi::NID_id_ce);
633     pub const SUBJECT_DIRECTORY_ATTRIBUTES: Nid = Nid(ffi::NID_subject_directory_attributes);
634     pub const SUBJECT_KEY_IDENTIFIER: Nid = Nid(ffi::NID_subject_key_identifier);
635     pub const KEY_USAGE: Nid = Nid(ffi::NID_key_usage);
636     pub const PRIVATE_KEY_USAGE_PERIOD: Nid = Nid(ffi::NID_private_key_usage_period);
637     pub const SUBJECT_ALT_NAME: Nid = Nid(ffi::NID_subject_alt_name);
638     pub const ISSUER_ALT_NAME: Nid = Nid(ffi::NID_issuer_alt_name);
639     pub const BASIC_CONSTRAINTS: Nid = Nid(ffi::NID_basic_constraints);
640     pub const CRL_NUMBER: Nid = Nid(ffi::NID_crl_number);
641     pub const CRL_REASON: Nid = Nid(ffi::NID_crl_reason);
642     pub const INVALIDITY_DATE: Nid = Nid(ffi::NID_invalidity_date);
643     pub const DELTA_CRL: Nid = Nid(ffi::NID_delta_crl);
644     pub const ISSUING_DISTRIBUTION_POINT: Nid = Nid(ffi::NID_issuing_distribution_point);
645     pub const CERTIFICATE_ISSUER: Nid = Nid(ffi::NID_certificate_issuer);
646     pub const NAME_CONSTRAINTS: Nid = Nid(ffi::NID_name_constraints);
647     pub const CRL_DISTRIBUTION_POINTS: Nid = Nid(ffi::NID_crl_distribution_points);
648     pub const CERTIFICATE_POLICIES: Nid = Nid(ffi::NID_certificate_policies);
649     pub const ANY_POLICY: Nid = Nid(ffi::NID_any_policy);
650     pub const POLICY_MAPPINGS: Nid = Nid(ffi::NID_policy_mappings);
651     pub const AUTHORITY_KEY_IDENTIFIER: Nid = Nid(ffi::NID_authority_key_identifier);
652     pub const POLICY_CONSTRAINTS: Nid = Nid(ffi::NID_policy_constraints);
653     pub const EXT_KEY_USAGE: Nid = Nid(ffi::NID_ext_key_usage);
654     pub const FRESHEST_CRL: Nid = Nid(ffi::NID_freshest_crl);
655     pub const INHIBIT_ANY_POLICY: Nid = Nid(ffi::NID_inhibit_any_policy);
656     pub const TARGET_INFORMATION: Nid = Nid(ffi::NID_target_information);
657     pub const NO_REV_AVAIL: Nid = Nid(ffi::NID_no_rev_avail);
658     pub const ANYEXTENDEDKEYUSAGE: Nid = Nid(ffi::NID_anyExtendedKeyUsage);
659     pub const NETSCAPE: Nid = Nid(ffi::NID_netscape);
660     pub const NETSCAPE_CERT_EXTENSION: Nid = Nid(ffi::NID_netscape_cert_extension);
661     pub const NETSCAPE_DATA_TYPE: Nid = Nid(ffi::NID_netscape_data_type);
662     pub const NETSCAPE_CERT_TYPE: Nid = Nid(ffi::NID_netscape_cert_type);
663     pub const NETSCAPE_BASE_URL: Nid = Nid(ffi::NID_netscape_base_url);
664     pub const NETSCAPE_REVOCATION_URL: Nid = Nid(ffi::NID_netscape_revocation_url);
665     pub const NETSCAPE_CA_REVOCATION_URL: Nid = Nid(ffi::NID_netscape_ca_revocation_url);
666     pub const NETSCAPE_RENEWAL_URL: Nid = Nid(ffi::NID_netscape_renewal_url);
667     pub const NETSCAPE_CA_POLICY_URL: Nid = Nid(ffi::NID_netscape_ca_policy_url);
668     pub const NETSCAPE_SSL_SERVER_NAME: Nid = Nid(ffi::NID_netscape_ssl_server_name);
669     pub const NETSCAPE_COMMENT: Nid = Nid(ffi::NID_netscape_comment);
670     pub const NETSCAPE_CERT_SEQUENCE: Nid = Nid(ffi::NID_netscape_cert_sequence);
671     pub const NS_SGC: Nid = Nid(ffi::NID_ns_sgc);
672     pub const ORG: Nid = Nid(ffi::NID_org);
673     pub const DOD: Nid = Nid(ffi::NID_dod);
674     pub const IANA: Nid = Nid(ffi::NID_iana);
675     pub const DIRECTORY: Nid = Nid(ffi::NID_Directory);
676     pub const MANAGEMENT: Nid = Nid(ffi::NID_Management);
677     pub const EXPERIMENTAL: Nid = Nid(ffi::NID_Experimental);
678     pub const PRIVATE: Nid = Nid(ffi::NID_Private);
679     pub const SECURITY: Nid = Nid(ffi::NID_Security);
680     pub const SNMPV2: Nid = Nid(ffi::NID_SNMPv2);
681     pub const MAIL: Nid = Nid(ffi::NID_Mail);
682     pub const ENTERPRISES: Nid = Nid(ffi::NID_Enterprises);
683     pub const DCOBJECT: Nid = Nid(ffi::NID_dcObject);
684     pub const MIME_MHS: Nid = Nid(ffi::NID_mime_mhs);
685     pub const MIME_MHS_HEADINGS: Nid = Nid(ffi::NID_mime_mhs_headings);
686     pub const MIME_MHS_BODIES: Nid = Nid(ffi::NID_mime_mhs_bodies);
687     pub const ID_HEX_PARTIAL_MESSAGE: Nid = Nid(ffi::NID_id_hex_partial_message);
688     pub const ID_HEX_MULTIPART_MESSAGE: Nid = Nid(ffi::NID_id_hex_multipart_message);
689     pub const ZLIB_COMPRESSION: Nid = Nid(ffi::NID_zlib_compression);
690     pub const AES_128_ECB: Nid = Nid(ffi::NID_aes_128_ecb);
691     pub const AES_128_CBC: Nid = Nid(ffi::NID_aes_128_cbc);
692     pub const AES_128_OFB128: Nid = Nid(ffi::NID_aes_128_ofb128);
693     pub const AES_128_CFB128: Nid = Nid(ffi::NID_aes_128_cfb128);
694     pub const ID_AES128_WRAP: Nid = Nid(ffi::NID_id_aes128_wrap);
695     pub const AES_128_GCM: Nid = Nid(ffi::NID_aes_128_gcm);
696     pub const AES_128_CCM: Nid = Nid(ffi::NID_aes_128_ccm);
697     pub const ID_AES128_WRAP_PAD: Nid = Nid(ffi::NID_id_aes128_wrap_pad);
698     pub const AES_192_ECB: Nid = Nid(ffi::NID_aes_192_ecb);
699     pub const AES_192_CBC: Nid = Nid(ffi::NID_aes_192_cbc);
700     pub const AES_192_OFB128: Nid = Nid(ffi::NID_aes_192_ofb128);
701     pub const AES_192_CFB128: Nid = Nid(ffi::NID_aes_192_cfb128);
702     pub const ID_AES192_WRAP: Nid = Nid(ffi::NID_id_aes192_wrap);
703     pub const AES_192_GCM: Nid = Nid(ffi::NID_aes_192_gcm);
704     pub const AES_192_CCM: Nid = Nid(ffi::NID_aes_192_ccm);
705     pub const ID_AES192_WRAP_PAD: Nid = Nid(ffi::NID_id_aes192_wrap_pad);
706     pub const AES_256_ECB: Nid = Nid(ffi::NID_aes_256_ecb);
707     pub const AES_256_CBC: Nid = Nid(ffi::NID_aes_256_cbc);
708     pub const AES_256_OFB128: Nid = Nid(ffi::NID_aes_256_ofb128);
709     pub const AES_256_CFB128: Nid = Nid(ffi::NID_aes_256_cfb128);
710     pub const ID_AES256_WRAP: Nid = Nid(ffi::NID_id_aes256_wrap);
711     pub const AES_256_GCM: Nid = Nid(ffi::NID_aes_256_gcm);
712     pub const AES_256_CCM: Nid = Nid(ffi::NID_aes_256_ccm);
713     pub const ID_AES256_WRAP_PAD: Nid = Nid(ffi::NID_id_aes256_wrap_pad);
714     pub const AES_128_CFB1: Nid = Nid(ffi::NID_aes_128_cfb1);
715     pub const AES_192_CFB1: Nid = Nid(ffi::NID_aes_192_cfb1);
716     pub const AES_256_CFB1: Nid = Nid(ffi::NID_aes_256_cfb1);
717     pub const AES_128_CFB8: Nid = Nid(ffi::NID_aes_128_cfb8);
718     pub const AES_192_CFB8: Nid = Nid(ffi::NID_aes_192_cfb8);
719     pub const AES_256_CFB8: Nid = Nid(ffi::NID_aes_256_cfb8);
720     pub const AES_128_CTR: Nid = Nid(ffi::NID_aes_128_ctr);
721     pub const AES_192_CTR: Nid = Nid(ffi::NID_aes_192_ctr);
722     pub const AES_256_CTR: Nid = Nid(ffi::NID_aes_256_ctr);
723     pub const AES_128_XTS: Nid = Nid(ffi::NID_aes_128_xts);
724     pub const AES_256_XTS: Nid = Nid(ffi::NID_aes_256_xts);
725     pub const DES_CFB1: Nid = Nid(ffi::NID_des_cfb1);
726     pub const DES_CFB8: Nid = Nid(ffi::NID_des_cfb8);
727     pub const DES_EDE3_CFB1: Nid = Nid(ffi::NID_des_ede3_cfb1);
728     pub const DES_EDE3_CFB8: Nid = Nid(ffi::NID_des_ede3_cfb8);
729     pub const SHA256: Nid = Nid(ffi::NID_sha256);
730     pub const SHA384: Nid = Nid(ffi::NID_sha384);
731     pub const SHA512: Nid = Nid(ffi::NID_sha512);
732     pub const SHA224: Nid = Nid(ffi::NID_sha224);
733     pub const DSA_WITH_SHA224: Nid = Nid(ffi::NID_dsa_with_SHA224);
734     pub const DSA_WITH_SHA256: Nid = Nid(ffi::NID_dsa_with_SHA256);
735     pub const HOLD_INSTRUCTION_CODE: Nid = Nid(ffi::NID_hold_instruction_code);
736     pub const HOLD_INSTRUCTION_NONE: Nid = Nid(ffi::NID_hold_instruction_none);
737     pub const HOLD_INSTRUCTION_CALL_ISSUER: Nid = Nid(ffi::NID_hold_instruction_call_issuer);
738     pub const HOLD_INSTRUCTION_REJECT: Nid = Nid(ffi::NID_hold_instruction_reject);
739     pub const DATA: Nid = Nid(ffi::NID_data);
740     pub const PSS: Nid = Nid(ffi::NID_pss);
741     pub const UCL: Nid = Nid(ffi::NID_ucl);
742     pub const PILOT: Nid = Nid(ffi::NID_pilot);
743     pub const PILOTATTRIBUTETYPE: Nid = Nid(ffi::NID_pilotAttributeType);
744     pub const PILOTATTRIBUTESYNTAX: Nid = Nid(ffi::NID_pilotAttributeSyntax);
745     pub const PILOTOBJECTCLASS: Nid = Nid(ffi::NID_pilotObjectClass);
746     pub const PILOTGROUPS: Nid = Nid(ffi::NID_pilotGroups);
747     pub const IA5STRINGSYNTAX: Nid = Nid(ffi::NID_iA5StringSyntax);
748     pub const CASEIGNOREIA5STRINGSYNTAX: Nid = Nid(ffi::NID_caseIgnoreIA5StringSyntax);
749     pub const PILOTOBJECT: Nid = Nid(ffi::NID_pilotObject);
750     pub const PILOTPERSON: Nid = Nid(ffi::NID_pilotPerson);
751     pub const ACCOUNT: Nid = Nid(ffi::NID_account);
752     pub const DOCUMENT: Nid = Nid(ffi::NID_document);
753     pub const ROOM: Nid = Nid(ffi::NID_room);
754     pub const DOCUMENTSERIES: Nid = Nid(ffi::NID_documentSeries);
755     pub const DOMAIN: Nid = Nid(ffi::NID_Domain);
756     pub const RFC822LOCALPART: Nid = Nid(ffi::NID_rFC822localPart);
757     pub const DNSDOMAIN: Nid = Nid(ffi::NID_dNSDomain);
758     pub const DOMAINRELATEDOBJECT: Nid = Nid(ffi::NID_domainRelatedObject);
759     pub const FRIENDLYCOUNTRY: Nid = Nid(ffi::NID_friendlyCountry);
760     pub const SIMPLESECURITYOBJECT: Nid = Nid(ffi::NID_simpleSecurityObject);
761     pub const PILOTORGANIZATION: Nid = Nid(ffi::NID_pilotOrganization);
762     pub const PILOTDSA: Nid = Nid(ffi::NID_pilotDSA);
763     pub const QUALITYLABELLEDDATA: Nid = Nid(ffi::NID_qualityLabelledData);
764     pub const USERID: Nid = Nid(ffi::NID_userId);
765     pub const TEXTENCODEDORADDRESS: Nid = Nid(ffi::NID_textEncodedORAddress);
766     pub const RFC822MAILBOX: Nid = Nid(ffi::NID_rfc822Mailbox);
767     pub const INFO: Nid = Nid(ffi::NID_info);
768     pub const FAVOURITEDRINK: Nid = Nid(ffi::NID_favouriteDrink);
769     pub const ROOMNUMBER: Nid = Nid(ffi::NID_roomNumber);
770     pub const PHOTO: Nid = Nid(ffi::NID_photo);
771     pub const USERCLASS: Nid = Nid(ffi::NID_userClass);
772     pub const HOST: Nid = Nid(ffi::NID_host);
773     pub const MANAGER: Nid = Nid(ffi::NID_manager);
774     pub const DOCUMENTIDENTIFIER: Nid = Nid(ffi::NID_documentIdentifier);
775     pub const DOCUMENTTITLE: Nid = Nid(ffi::NID_documentTitle);
776     pub const DOCUMENTVERSION: Nid = Nid(ffi::NID_documentVersion);
777     pub const DOCUMENTAUTHOR: Nid = Nid(ffi::NID_documentAuthor);
778     pub const DOCUMENTLOCATION: Nid = Nid(ffi::NID_documentLocation);
779     pub const HOMETELEPHONENUMBER: Nid = Nid(ffi::NID_homeTelephoneNumber);
780     pub const SECRETARY: Nid = Nid(ffi::NID_secretary);
781     pub const OTHERMAILBOX: Nid = Nid(ffi::NID_otherMailbox);
782     pub const LASTMODIFIEDTIME: Nid = Nid(ffi::NID_lastModifiedTime);
783     pub const LASTMODIFIEDBY: Nid = Nid(ffi::NID_lastModifiedBy);
784     pub const DOMAINCOMPONENT: Nid = Nid(ffi::NID_domainComponent);
785     pub const ARECORD: Nid = Nid(ffi::NID_aRecord);
786     pub const PILOTATTRIBUTETYPE27: Nid = Nid(ffi::NID_pilotAttributeType27);
787     pub const MXRECORD: Nid = Nid(ffi::NID_mXRecord);
788     pub const NSRECORD: Nid = Nid(ffi::NID_nSRecord);
789     pub const SOARECORD: Nid = Nid(ffi::NID_sOARecord);
790     pub const CNAMERECORD: Nid = Nid(ffi::NID_cNAMERecord);
791     pub const ASSOCIATEDDOMAIN: Nid = Nid(ffi::NID_associatedDomain);
792     pub const ASSOCIATEDNAME: Nid = Nid(ffi::NID_associatedName);
793     pub const HOMEPOSTALADDRESS: Nid = Nid(ffi::NID_homePostalAddress);
794     pub const PERSONALTITLE: Nid = Nid(ffi::NID_personalTitle);
795     pub const MOBILETELEPHONENUMBER: Nid = Nid(ffi::NID_mobileTelephoneNumber);
796     pub const PAGERTELEPHONENUMBER: Nid = Nid(ffi::NID_pagerTelephoneNumber);
797     pub const FRIENDLYCOUNTRYNAME: Nid = Nid(ffi::NID_friendlyCountryName);
798     pub const ORGANIZATIONALSTATUS: Nid = Nid(ffi::NID_organizationalStatus);
799     pub const JANETMAILBOX: Nid = Nid(ffi::NID_janetMailbox);
800     pub const MAILPREFERENCEOPTION: Nid = Nid(ffi::NID_mailPreferenceOption);
801     pub const BUILDINGNAME: Nid = Nid(ffi::NID_buildingName);
802     pub const DSAQUALITY: Nid = Nid(ffi::NID_dSAQuality);
803     pub const SINGLELEVELQUALITY: Nid = Nid(ffi::NID_singleLevelQuality);
804     pub const SUBTREEMINIMUMQUALITY: Nid = Nid(ffi::NID_subtreeMinimumQuality);
805     pub const SUBTREEMAXIMUMQUALITY: Nid = Nid(ffi::NID_subtreeMaximumQuality);
806     pub const PERSONALSIGNATURE: Nid = Nid(ffi::NID_personalSignature);
807     pub const DITREDIRECT: Nid = Nid(ffi::NID_dITRedirect);
808     pub const AUDIO: Nid = Nid(ffi::NID_audio);
809     pub const DOCUMENTPUBLISHER: Nid = Nid(ffi::NID_documentPublisher);
810     pub const ID_SET: Nid = Nid(ffi::NID_id_set);
811     pub const SET_CTYPE: Nid = Nid(ffi::NID_set_ctype);
812     pub const SET_MSGEXT: Nid = Nid(ffi::NID_set_msgExt);
813     pub const SET_ATTR: Nid = Nid(ffi::NID_set_attr);
814     pub const SET_POLICY: Nid = Nid(ffi::NID_set_policy);
815     pub const SET_CERTEXT: Nid = Nid(ffi::NID_set_certExt);
816     pub const SET_BRAND: Nid = Nid(ffi::NID_set_brand);
817     pub const SETCT_PANDATA: Nid = Nid(ffi::NID_setct_PANData);
818     pub const SETCT_PANTOKEN: Nid = Nid(ffi::NID_setct_PANToken);
819     pub const SETCT_PANONLY: Nid = Nid(ffi::NID_setct_PANOnly);
820     pub const SETCT_OIDATA: Nid = Nid(ffi::NID_setct_OIData);
821     pub const SETCT_PI: Nid = Nid(ffi::NID_setct_PI);
822     pub const SETCT_PIDATA: Nid = Nid(ffi::NID_setct_PIData);
823     pub const SETCT_PIDATAUNSIGNED: Nid = Nid(ffi::NID_setct_PIDataUnsigned);
824     pub const SETCT_HODINPUT: Nid = Nid(ffi::NID_setct_HODInput);
825     pub const SETCT_AUTHRESBAGGAGE: Nid = Nid(ffi::NID_setct_AuthResBaggage);
826     pub const SETCT_AUTHREVREQBAGGAGE: Nid = Nid(ffi::NID_setct_AuthRevReqBaggage);
827     pub const SETCT_AUTHREVRESBAGGAGE: Nid = Nid(ffi::NID_setct_AuthRevResBaggage);
828     pub const SETCT_CAPTOKENSEQ: Nid = Nid(ffi::NID_setct_CapTokenSeq);
829     pub const SETCT_PINITRESDATA: Nid = Nid(ffi::NID_setct_PInitResData);
830     pub const SETCT_PI_TBS: Nid = Nid(ffi::NID_setct_PI_TBS);
831     pub const SETCT_PRESDATA: Nid = Nid(ffi::NID_setct_PResData);
832     pub const SETCT_AUTHREQTBS: Nid = Nid(ffi::NID_setct_AuthReqTBS);
833     pub const SETCT_AUTHRESTBS: Nid = Nid(ffi::NID_setct_AuthResTBS);
834     pub const SETCT_AUTHRESTBSX: Nid = Nid(ffi::NID_setct_AuthResTBSX);
835     pub const SETCT_AUTHTOKENTBS: Nid = Nid(ffi::NID_setct_AuthTokenTBS);
836     pub const SETCT_CAPTOKENDATA: Nid = Nid(ffi::NID_setct_CapTokenData);
837     pub const SETCT_CAPTOKENTBS: Nid = Nid(ffi::NID_setct_CapTokenTBS);
838     pub const SETCT_ACQCARDCODEMSG: Nid = Nid(ffi::NID_setct_AcqCardCodeMsg);
839     pub const SETCT_AUTHREVREQTBS: Nid = Nid(ffi::NID_setct_AuthRevReqTBS);
840     pub const SETCT_AUTHREVRESDATA: Nid = Nid(ffi::NID_setct_AuthRevResData);
841     pub const SETCT_AUTHREVRESTBS: Nid = Nid(ffi::NID_setct_AuthRevResTBS);
842     pub const SETCT_CAPREQTBS: Nid = Nid(ffi::NID_setct_CapReqTBS);
843     pub const SETCT_CAPREQTBSX: Nid = Nid(ffi::NID_setct_CapReqTBSX);
844     pub const SETCT_CAPRESDATA: Nid = Nid(ffi::NID_setct_CapResData);
845     pub const SETCT_CAPREVREQTBS: Nid = Nid(ffi::NID_setct_CapRevReqTBS);
846     pub const SETCT_CAPREVREQTBSX: Nid = Nid(ffi::NID_setct_CapRevReqTBSX);
847     pub const SETCT_CAPREVRESDATA: Nid = Nid(ffi::NID_setct_CapRevResData);
848     pub const SETCT_CREDREQTBS: Nid = Nid(ffi::NID_setct_CredReqTBS);
849     pub const SETCT_CREDREQTBSX: Nid = Nid(ffi::NID_setct_CredReqTBSX);
850     pub const SETCT_CREDRESDATA: Nid = Nid(ffi::NID_setct_CredResData);
851     pub const SETCT_CREDREVREQTBS: Nid = Nid(ffi::NID_setct_CredRevReqTBS);
852     pub const SETCT_CREDREVREQTBSX: Nid = Nid(ffi::NID_setct_CredRevReqTBSX);
853     pub const SETCT_CREDREVRESDATA: Nid = Nid(ffi::NID_setct_CredRevResData);
854     pub const SETCT_PCERTREQDATA: Nid = Nid(ffi::NID_setct_PCertReqData);
855     pub const SETCT_PCERTRESTBS: Nid = Nid(ffi::NID_setct_PCertResTBS);
856     pub const SETCT_BATCHADMINREQDATA: Nid = Nid(ffi::NID_setct_BatchAdminReqData);
857     pub const SETCT_BATCHADMINRESDATA: Nid = Nid(ffi::NID_setct_BatchAdminResData);
858     pub const SETCT_CARDCINITRESTBS: Nid = Nid(ffi::NID_setct_CardCInitResTBS);
859     pub const SETCT_MEAQCINITRESTBS: Nid = Nid(ffi::NID_setct_MeAqCInitResTBS);
860     pub const SETCT_REGFORMRESTBS: Nid = Nid(ffi::NID_setct_RegFormResTBS);
861     pub const SETCT_CERTREQDATA: Nid = Nid(ffi::NID_setct_CertReqData);
862     pub const SETCT_CERTREQTBS: Nid = Nid(ffi::NID_setct_CertReqTBS);
863     pub const SETCT_CERTRESDATA: Nid = Nid(ffi::NID_setct_CertResData);
864     pub const SETCT_CERTINQREQTBS: Nid = Nid(ffi::NID_setct_CertInqReqTBS);
865     pub const SETCT_ERRORTBS: Nid = Nid(ffi::NID_setct_ErrorTBS);
866     pub const SETCT_PIDUALSIGNEDTBE: Nid = Nid(ffi::NID_setct_PIDualSignedTBE);
867     pub const SETCT_PIUNSIGNEDTBE: Nid = Nid(ffi::NID_setct_PIUnsignedTBE);
868     pub const SETCT_AUTHREQTBE: Nid = Nid(ffi::NID_setct_AuthReqTBE);
869     pub const SETCT_AUTHRESTBE: Nid = Nid(ffi::NID_setct_AuthResTBE);
870     pub const SETCT_AUTHRESTBEX: Nid = Nid(ffi::NID_setct_AuthResTBEX);
871     pub const SETCT_AUTHTOKENTBE: Nid = Nid(ffi::NID_setct_AuthTokenTBE);
872     pub const SETCT_CAPTOKENTBE: Nid = Nid(ffi::NID_setct_CapTokenTBE);
873     pub const SETCT_CAPTOKENTBEX: Nid = Nid(ffi::NID_setct_CapTokenTBEX);
874     pub const SETCT_ACQCARDCODEMSGTBE: Nid = Nid(ffi::NID_setct_AcqCardCodeMsgTBE);
875     pub const SETCT_AUTHREVREQTBE: Nid = Nid(ffi::NID_setct_AuthRevReqTBE);
876     pub const SETCT_AUTHREVRESTBE: Nid = Nid(ffi::NID_setct_AuthRevResTBE);
877     pub const SETCT_AUTHREVRESTBEB: Nid = Nid(ffi::NID_setct_AuthRevResTBEB);
878     pub const SETCT_CAPREQTBE: Nid = Nid(ffi::NID_setct_CapReqTBE);
879     pub const SETCT_CAPREQTBEX: Nid = Nid(ffi::NID_setct_CapReqTBEX);
880     pub const SETCT_CAPRESTBE: Nid = Nid(ffi::NID_setct_CapResTBE);
881     pub const SETCT_CAPREVREQTBE: Nid = Nid(ffi::NID_setct_CapRevReqTBE);
882     pub const SETCT_CAPREVREQTBEX: Nid = Nid(ffi::NID_setct_CapRevReqTBEX);
883     pub const SETCT_CAPREVRESTBE: Nid = Nid(ffi::NID_setct_CapRevResTBE);
884     pub const SETCT_CREDREQTBE: Nid = Nid(ffi::NID_setct_CredReqTBE);
885     pub const SETCT_CREDREQTBEX: Nid = Nid(ffi::NID_setct_CredReqTBEX);
886     pub const SETCT_CREDRESTBE: Nid = Nid(ffi::NID_setct_CredResTBE);
887     pub const SETCT_CREDREVREQTBE: Nid = Nid(ffi::NID_setct_CredRevReqTBE);
888     pub const SETCT_CREDREVREQTBEX: Nid = Nid(ffi::NID_setct_CredRevReqTBEX);
889     pub const SETCT_CREDREVRESTBE: Nid = Nid(ffi::NID_setct_CredRevResTBE);
890     pub const SETCT_BATCHADMINREQTBE: Nid = Nid(ffi::NID_setct_BatchAdminReqTBE);
891     pub const SETCT_BATCHADMINRESTBE: Nid = Nid(ffi::NID_setct_BatchAdminResTBE);
892     pub const SETCT_REGFORMREQTBE: Nid = Nid(ffi::NID_setct_RegFormReqTBE);
893     pub const SETCT_CERTREQTBE: Nid = Nid(ffi::NID_setct_CertReqTBE);
894     pub const SETCT_CERTREQTBEX: Nid = Nid(ffi::NID_setct_CertReqTBEX);
895     pub const SETCT_CERTRESTBE: Nid = Nid(ffi::NID_setct_CertResTBE);
896     pub const SETCT_CRLNOTIFICATIONTBS: Nid = Nid(ffi::NID_setct_CRLNotificationTBS);
897     pub const SETCT_CRLNOTIFICATIONRESTBS: Nid = Nid(ffi::NID_setct_CRLNotificationResTBS);
898     pub const SETCT_BCIDISTRIBUTIONTBS: Nid = Nid(ffi::NID_setct_BCIDistributionTBS);
899     pub const SETEXT_GENCRYPT: Nid = Nid(ffi::NID_setext_genCrypt);
900     pub const SETEXT_MIAUTH: Nid = Nid(ffi::NID_setext_miAuth);
901     pub const SETEXT_PINSECURE: Nid = Nid(ffi::NID_setext_pinSecure);
902     pub const SETEXT_PINANY: Nid = Nid(ffi::NID_setext_pinAny);
903     pub const SETEXT_TRACK2: Nid = Nid(ffi::NID_setext_track2);
904     pub const SETEXT_CV: Nid = Nid(ffi::NID_setext_cv);
905     pub const SET_POLICY_ROOT: Nid = Nid(ffi::NID_set_policy_root);
906     pub const SETCEXT_HASHEDROOT: Nid = Nid(ffi::NID_setCext_hashedRoot);
907     pub const SETCEXT_CERTTYPE: Nid = Nid(ffi::NID_setCext_certType);
908     pub const SETCEXT_MERCHDATA: Nid = Nid(ffi::NID_setCext_merchData);
909     pub const SETCEXT_CCERTREQUIRED: Nid = Nid(ffi::NID_setCext_cCertRequired);
910     pub const SETCEXT_TUNNELING: Nid = Nid(ffi::NID_setCext_tunneling);
911     pub const SETCEXT_SETEXT: Nid = Nid(ffi::NID_setCext_setExt);
912     pub const SETCEXT_SETQUALF: Nid = Nid(ffi::NID_setCext_setQualf);
913     pub const SETCEXT_PGWYCAPABILITIES: Nid = Nid(ffi::NID_setCext_PGWYcapabilities);
914     pub const SETCEXT_TOKENIDENTIFIER: Nid = Nid(ffi::NID_setCext_TokenIdentifier);
915     pub const SETCEXT_TRACK2DATA: Nid = Nid(ffi::NID_setCext_Track2Data);
916     pub const SETCEXT_TOKENTYPE: Nid = Nid(ffi::NID_setCext_TokenType);
917     pub const SETCEXT_ISSUERCAPABILITIES: Nid = Nid(ffi::NID_setCext_IssuerCapabilities);
918     pub const SETATTR_CERT: Nid = Nid(ffi::NID_setAttr_Cert);
919     pub const SETATTR_PGWYCAP: Nid = Nid(ffi::NID_setAttr_PGWYcap);
920     pub const SETATTR_TOKENTYPE: Nid = Nid(ffi::NID_setAttr_TokenType);
921     pub const SETATTR_ISSCAP: Nid = Nid(ffi::NID_setAttr_IssCap);
922     pub const SET_ROOTKEYTHUMB: Nid = Nid(ffi::NID_set_rootKeyThumb);
923     pub const SET_ADDPOLICY: Nid = Nid(ffi::NID_set_addPolicy);
924     pub const SETATTR_TOKEN_EMV: Nid = Nid(ffi::NID_setAttr_Token_EMV);
925     pub const SETATTR_TOKEN_B0PRIME: Nid = Nid(ffi::NID_setAttr_Token_B0Prime);
926     pub const SETATTR_ISSCAP_CVM: Nid = Nid(ffi::NID_setAttr_IssCap_CVM);
927     pub const SETATTR_ISSCAP_T2: Nid = Nid(ffi::NID_setAttr_IssCap_T2);
928     pub const SETATTR_ISSCAP_SIG: Nid = Nid(ffi::NID_setAttr_IssCap_Sig);
929     pub const SETATTR_GENCRYPTGRM: Nid = Nid(ffi::NID_setAttr_GenCryptgrm);
930     pub const SETATTR_T2ENC: Nid = Nid(ffi::NID_setAttr_T2Enc);
931     pub const SETATTR_T2CLEARTXT: Nid = Nid(ffi::NID_setAttr_T2cleartxt);
932     pub const SETATTR_TOKICCSIG: Nid = Nid(ffi::NID_setAttr_TokICCsig);
933     pub const SETATTR_SECDEVSIG: Nid = Nid(ffi::NID_setAttr_SecDevSig);
934     pub const SET_BRAND_IATA_ATA: Nid = Nid(ffi::NID_set_brand_IATA_ATA);
935     pub const SET_BRAND_DINERS: Nid = Nid(ffi::NID_set_brand_Diners);
936     pub const SET_BRAND_AMERICANEXPRESS: Nid = Nid(ffi::NID_set_brand_AmericanExpress);
937     pub const SET_BRAND_JCB: Nid = Nid(ffi::NID_set_brand_JCB);
938     pub const SET_BRAND_VISA: Nid = Nid(ffi::NID_set_brand_Visa);
939     pub const SET_BRAND_MASTERCARD: Nid = Nid(ffi::NID_set_brand_MasterCard);
940     pub const SET_BRAND_NOVUS: Nid = Nid(ffi::NID_set_brand_Novus);
941     pub const DES_CDMF: Nid = Nid(ffi::NID_des_cdmf);
942     pub const RSAOAEPENCRYPTIONSET: Nid = Nid(ffi::NID_rsaOAEPEncryptionSET);
943     pub const IPSEC3: Nid = Nid(ffi::NID_ipsec3);
944     pub const IPSEC4: Nid = Nid(ffi::NID_ipsec4);
945     pub const WHIRLPOOL: Nid = Nid(ffi::NID_whirlpool);
946     pub const CRYPTOPRO: Nid = Nid(ffi::NID_cryptopro);
947     pub const CRYPTOCOM: Nid = Nid(ffi::NID_cryptocom);
948     pub const ID_GOSTR3411_94_WITH_GOSTR3410_2001: Nid =
949         Nid(ffi::NID_id_GostR3411_94_with_GostR3410_2001);
950     pub const ID_GOSTR3411_94_WITH_GOSTR3410_94: Nid =
951         Nid(ffi::NID_id_GostR3411_94_with_GostR3410_94);
952     pub const ID_GOSTR3411_94: Nid = Nid(ffi::NID_id_GostR3411_94);
953     pub const ID_HMACGOSTR3411_94: Nid = Nid(ffi::NID_id_HMACGostR3411_94);
954     pub const ID_GOSTR3410_2001: Nid = Nid(ffi::NID_id_GostR3410_2001);
955     pub const ID_GOSTR3410_94: Nid = Nid(ffi::NID_id_GostR3410_94);
956     pub const ID_GOST28147_89: Nid = Nid(ffi::NID_id_Gost28147_89);
957     pub const GOST89_CNT: Nid = Nid(ffi::NID_gost89_cnt);
958     pub const ID_GOST28147_89_MAC: Nid = Nid(ffi::NID_id_Gost28147_89_MAC);
959     pub const ID_GOSTR3411_94_PRF: Nid = Nid(ffi::NID_id_GostR3411_94_prf);
960     pub const ID_GOSTR3410_2001DH: Nid = Nid(ffi::NID_id_GostR3410_2001DH);
961     pub const ID_GOSTR3410_94DH: Nid = Nid(ffi::NID_id_GostR3410_94DH);
962     pub const ID_GOST28147_89_CRYPTOPRO_KEYMESHING: Nid =
963         Nid(ffi::NID_id_Gost28147_89_CryptoPro_KeyMeshing);
964     pub const ID_GOST28147_89_NONE_KEYMESHING: Nid = Nid(ffi::NID_id_Gost28147_89_None_KeyMeshing);
965     pub const ID_GOSTR3411_94_TESTPARAMSET: Nid = Nid(ffi::NID_id_GostR3411_94_TestParamSet);
966     pub const ID_GOSTR3411_94_CRYPTOPROPARAMSET: Nid =
967         Nid(ffi::NID_id_GostR3411_94_CryptoProParamSet);
968     pub const ID_GOST28147_89_TESTPARAMSET: Nid = Nid(ffi::NID_id_Gost28147_89_TestParamSet);
969     pub const ID_GOST28147_89_CRYPTOPRO_A_PARAMSET: Nid =
970         Nid(ffi::NID_id_Gost28147_89_CryptoPro_A_ParamSet);
971     pub const ID_GOST28147_89_CRYPTOPRO_B_PARAMSET: Nid =
972         Nid(ffi::NID_id_Gost28147_89_CryptoPro_B_ParamSet);
973     pub const ID_GOST28147_89_CRYPTOPRO_C_PARAMSET: Nid =
974         Nid(ffi::NID_id_Gost28147_89_CryptoPro_C_ParamSet);
975     pub const ID_GOST28147_89_CRYPTOPRO_D_PARAMSET: Nid =
976         Nid(ffi::NID_id_Gost28147_89_CryptoPro_D_ParamSet);
977     pub const ID_GOST28147_89_CRYPTOPRO_OSCAR_1_1_PARAMSET: Nid =
978         Nid(ffi::NID_id_Gost28147_89_CryptoPro_Oscar_1_1_ParamSet);
979     pub const ID_GOST28147_89_CRYPTOPRO_OSCAR_1_0_PARAMSET: Nid =
980         Nid(ffi::NID_id_Gost28147_89_CryptoPro_Oscar_1_0_ParamSet);
981     pub const ID_GOST28147_89_CRYPTOPRO_RIC_1_PARAMSET: Nid =
982         Nid(ffi::NID_id_Gost28147_89_CryptoPro_RIC_1_ParamSet);
983     pub const ID_GOSTR3410_94_TESTPARAMSET: Nid = Nid(ffi::NID_id_GostR3410_94_TestParamSet);
984     pub const ID_GOSTR3410_94_CRYPTOPRO_A_PARAMSET: Nid =
985         Nid(ffi::NID_id_GostR3410_94_CryptoPro_A_ParamSet);
986     pub const ID_GOSTR3410_94_CRYPTOPRO_B_PARAMSET: Nid =
987         Nid(ffi::NID_id_GostR3410_94_CryptoPro_B_ParamSet);
988     pub const ID_GOSTR3410_94_CRYPTOPRO_C_PARAMSET: Nid =
989         Nid(ffi::NID_id_GostR3410_94_CryptoPro_C_ParamSet);
990     pub const ID_GOSTR3410_94_CRYPTOPRO_D_PARAMSET: Nid =
991         Nid(ffi::NID_id_GostR3410_94_CryptoPro_D_ParamSet);
992     pub const ID_GOSTR3410_94_CRYPTOPRO_XCHA_PARAMSET: Nid =
993         Nid(ffi::NID_id_GostR3410_94_CryptoPro_XchA_ParamSet);
994     pub const ID_GOSTR3410_94_CRYPTOPRO_XCHB_PARAMSET: Nid =
995         Nid(ffi::NID_id_GostR3410_94_CryptoPro_XchB_ParamSet);
996     pub const ID_GOSTR3410_94_CRYPTOPRO_XCHC_PARAMSET: Nid =
997         Nid(ffi::NID_id_GostR3410_94_CryptoPro_XchC_ParamSet);
998     pub const ID_GOSTR3410_2001_TESTPARAMSET: Nid = Nid(ffi::NID_id_GostR3410_2001_TestParamSet);
999     pub const ID_GOSTR3410_2001_CRYPTOPRO_A_PARAMSET: Nid =
1000         Nid(ffi::NID_id_GostR3410_2001_CryptoPro_A_ParamSet);
1001     pub const ID_GOSTR3410_2001_CRYPTOPRO_B_PARAMSET: Nid =
1002         Nid(ffi::NID_id_GostR3410_2001_CryptoPro_B_ParamSet);
1003     pub const ID_GOSTR3410_2001_CRYPTOPRO_C_PARAMSET: Nid =
1004         Nid(ffi::NID_id_GostR3410_2001_CryptoPro_C_ParamSet);
1005     pub const ID_GOSTR3410_2001_CRYPTOPRO_XCHA_PARAMSET: Nid =
1006         Nid(ffi::NID_id_GostR3410_2001_CryptoPro_XchA_ParamSet);
1007     pub const ID_GOSTR3410_2001_CRYPTOPRO_XCHB_PARAMSET: Nid =
1008         Nid(ffi::NID_id_GostR3410_2001_CryptoPro_XchB_ParamSet);
1009     pub const ID_GOSTR3410_94_A: Nid = Nid(ffi::NID_id_GostR3410_94_a);
1010     pub const ID_GOSTR3410_94_ABIS: Nid = Nid(ffi::NID_id_GostR3410_94_aBis);
1011     pub const ID_GOSTR3410_94_B: Nid = Nid(ffi::NID_id_GostR3410_94_b);
1012     pub const ID_GOSTR3410_94_BBIS: Nid = Nid(ffi::NID_id_GostR3410_94_bBis);
1013     pub const ID_GOST28147_89_CC: Nid = Nid(ffi::NID_id_Gost28147_89_cc);
1014     pub const ID_GOSTR3410_94_CC: Nid = Nid(ffi::NID_id_GostR3410_94_cc);
1015     pub const ID_GOSTR3410_2001_CC: Nid = Nid(ffi::NID_id_GostR3410_2001_cc);
1016     pub const ID_GOSTR3411_94_WITH_GOSTR3410_94_CC: Nid =
1017         Nid(ffi::NID_id_GostR3411_94_with_GostR3410_94_cc);
1018     pub const ID_GOSTR3411_94_WITH_GOSTR3410_2001_CC: Nid =
1019         Nid(ffi::NID_id_GostR3411_94_with_GostR3410_2001_cc);
1020     pub const ID_GOSTR3410_2001_PARAMSET_CC: Nid = Nid(ffi::NID_id_GostR3410_2001_ParamSet_cc);
1021     pub const CAMELLIA_128_CBC: Nid = Nid(ffi::NID_camellia_128_cbc);
1022     pub const CAMELLIA_192_CBC: Nid = Nid(ffi::NID_camellia_192_cbc);
1023     pub const CAMELLIA_256_CBC: Nid = Nid(ffi::NID_camellia_256_cbc);
1024     pub const ID_CAMELLIA128_WRAP: Nid = Nid(ffi::NID_id_camellia128_wrap);
1025     pub const ID_CAMELLIA192_WRAP: Nid = Nid(ffi::NID_id_camellia192_wrap);
1026     pub const ID_CAMELLIA256_WRAP: Nid = Nid(ffi::NID_id_camellia256_wrap);
1027     pub const CAMELLIA_128_ECB: Nid = Nid(ffi::NID_camellia_128_ecb);
1028     pub const CAMELLIA_128_OFB128: Nid = Nid(ffi::NID_camellia_128_ofb128);
1029     pub const CAMELLIA_128_CFB128: Nid = Nid(ffi::NID_camellia_128_cfb128);
1030     pub const CAMELLIA_192_ECB: Nid = Nid(ffi::NID_camellia_192_ecb);
1031     pub const CAMELLIA_192_OFB128: Nid = Nid(ffi::NID_camellia_192_ofb128);
1032     pub const CAMELLIA_192_CFB128: Nid = Nid(ffi::NID_camellia_192_cfb128);
1033     pub const CAMELLIA_256_ECB: Nid = Nid(ffi::NID_camellia_256_ecb);
1034     pub const CAMELLIA_256_OFB128: Nid = Nid(ffi::NID_camellia_256_ofb128);
1035     pub const CAMELLIA_256_CFB128: Nid = Nid(ffi::NID_camellia_256_cfb128);
1036     pub const CAMELLIA_128_CFB1: Nid = Nid(ffi::NID_camellia_128_cfb1);
1037     pub const CAMELLIA_192_CFB1: Nid = Nid(ffi::NID_camellia_192_cfb1);
1038     pub const CAMELLIA_256_CFB1: Nid = Nid(ffi::NID_camellia_256_cfb1);
1039     pub const CAMELLIA_128_CFB8: Nid = Nid(ffi::NID_camellia_128_cfb8);
1040     pub const CAMELLIA_192_CFB8: Nid = Nid(ffi::NID_camellia_192_cfb8);
1041     pub const CAMELLIA_256_CFB8: Nid = Nid(ffi::NID_camellia_256_cfb8);
1042     pub const KISA: Nid = Nid(ffi::NID_kisa);
1043     pub const SEED_ECB: Nid = Nid(ffi::NID_seed_ecb);
1044     pub const SEED_CBC: Nid = Nid(ffi::NID_seed_cbc);
1045     pub const SEED_CFB128: Nid = Nid(ffi::NID_seed_cfb128);
1046     pub const SEED_OFB128: Nid = Nid(ffi::NID_seed_ofb128);
1047     pub const HMAC: Nid = Nid(ffi::NID_hmac);
1048     pub const CMAC: Nid = Nid(ffi::NID_cmac);
1049     pub const RC4_HMAC_MD5: Nid = Nid(ffi::NID_rc4_hmac_md5);
1050     pub const AES_128_CBC_HMAC_SHA1: Nid = Nid(ffi::NID_aes_128_cbc_hmac_sha1);
1051     pub const AES_192_CBC_HMAC_SHA1: Nid = Nid(ffi::NID_aes_192_cbc_hmac_sha1);
1052     pub const AES_256_CBC_HMAC_SHA1: Nid = Nid(ffi::NID_aes_256_cbc_hmac_sha1);
1053 }
1054 
1055 #[cfg(test)]
1056 mod test {
1057     use super::Nid;
1058 
1059     #[test]
signature_digest()1060     fn signature_digest() {
1061         let algs = Nid::SHA256WITHRSAENCRYPTION.signature_algorithms().unwrap();
1062         assert_eq!(algs.digest, Nid::SHA256);
1063         assert_eq!(algs.pkey, Nid::RSAENCRYPTION);
1064     }
1065 
1066     #[test]
test_long_name_conversion()1067     fn test_long_name_conversion() {
1068         let common_name = Nid::COMMONNAME;
1069         let organizational_unit_name = Nid::ORGANIZATIONALUNITNAME;
1070         let aes256_cbc_hmac_sha1 = Nid::AES_256_CBC_HMAC_SHA1;
1071         let id_cmc_lrapopwitness = Nid::ID_CMC_LRAPOPWITNESS;
1072         let ms_ctl_sign = Nid::MS_CTL_SIGN;
1073         let undefined_nid = Nid::from_raw(118);
1074 
1075         assert_eq!(common_name.long_name().unwrap(), "commonName");
1076         assert_eq!(
1077             organizational_unit_name.long_name().unwrap(),
1078             "organizationalUnitName"
1079         );
1080         assert_eq!(
1081             aes256_cbc_hmac_sha1.long_name().unwrap(),
1082             "aes-256-cbc-hmac-sha1"
1083         );
1084         assert_eq!(
1085             id_cmc_lrapopwitness.long_name().unwrap(),
1086             "id-cmc-lraPOPWitness"
1087         );
1088         assert_eq!(
1089             ms_ctl_sign.long_name().unwrap(),
1090             "Microsoft Trust List Signing"
1091         );
1092         assert!(
1093             undefined_nid.long_name().is_err(),
1094             "undefined_nid should not return a valid value"
1095         );
1096     }
1097 
1098     #[test]
test_short_name_conversion()1099     fn test_short_name_conversion() {
1100         let common_name = Nid::COMMONNAME;
1101         let organizational_unit_name = Nid::ORGANIZATIONALUNITNAME;
1102         let aes256_cbc_hmac_sha1 = Nid::AES_256_CBC_HMAC_SHA1;
1103         let id_cmc_lrapopwitness = Nid::ID_CMC_LRAPOPWITNESS;
1104         let ms_ctl_sign = Nid::MS_CTL_SIGN;
1105         let undefined_nid = Nid::from_raw(118);
1106 
1107         assert_eq!(common_name.short_name().unwrap(), "CN");
1108         assert_eq!(organizational_unit_name.short_name().unwrap(), "OU");
1109         assert_eq!(
1110             aes256_cbc_hmac_sha1.short_name().unwrap(),
1111             "AES-256-CBC-HMAC-SHA1"
1112         );
1113         assert_eq!(
1114             id_cmc_lrapopwitness.short_name().unwrap(),
1115             "id-cmc-lraPOPWitness"
1116         );
1117         assert_eq!(ms_ctl_sign.short_name().unwrap(), "msCTLSign");
1118         assert!(
1119             undefined_nid.short_name().is_err(),
1120             "undefined_nid should not return a valid value"
1121         );
1122     }
1123 }
1124