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