1#![no_std]
6#![allow(unknown_lints)]
7#![allow(non_upper_case_globals)]
8#![allow(non_camel_case_types)]
9#![allow(non_snake_case)]
10#![allow(unnecessary_transmutes)]
11
12use core::ffi::c_ulong;
14
15mod bindgen {
18 #[cfg(not(bindgen_rs_file))]
19 include!(concat!(env!("OUT_DIR"), "/bindgen.rs"));
20 #[cfg(bindgen_rs_file)]
24 include!(env!("BINDGEN_RS_FILE"));
25}
26pub use bindgen::*;
27
28pub const ASN1_STRFLGS_ESC_2253: c_ulong = bindgen::ASN1_STRFLGS_ESC_2253 as c_ulong;
33pub const ASN1_STRFLGS_ESC_CTRL: c_ulong = bindgen::ASN1_STRFLGS_ESC_CTRL as c_ulong;
34pub const ASN1_STRFLGS_ESC_MSB: c_ulong = bindgen::ASN1_STRFLGS_ESC_MSB as c_ulong;
35pub const ASN1_STRFLGS_ESC_QUOTE: c_ulong = bindgen::ASN1_STRFLGS_ESC_QUOTE as c_ulong;
36pub const ASN1_STRFLGS_UTF8_CONVERT: c_ulong = bindgen::ASN1_STRFLGS_UTF8_CONVERT as c_ulong;
37pub const ASN1_STRFLGS_IGNORE_TYPE: c_ulong = bindgen::ASN1_STRFLGS_IGNORE_TYPE as c_ulong;
38pub const ASN1_STRFLGS_SHOW_TYPE: c_ulong = bindgen::ASN1_STRFLGS_SHOW_TYPE as c_ulong;
39pub const ASN1_STRFLGS_DUMP_ALL: c_ulong = bindgen::ASN1_STRFLGS_DUMP_ALL as c_ulong;
40pub const ASN1_STRFLGS_DUMP_UNKNOWN: c_ulong = bindgen::ASN1_STRFLGS_DUMP_UNKNOWN as c_ulong;
41pub const ASN1_STRFLGS_DUMP_DER: c_ulong = bindgen::ASN1_STRFLGS_DUMP_DER as c_ulong;
42pub const ASN1_STRFLGS_RFC2253: c_ulong = bindgen::ASN1_STRFLGS_RFC2253 as c_ulong;
43pub const XN_FLAG_COMPAT: c_ulong = bindgen::XN_FLAG_COMPAT as c_ulong;
44pub const XN_FLAG_SEP_MASK: c_ulong = bindgen::XN_FLAG_SEP_MASK as c_ulong;
45pub const XN_FLAG_SEP_COMMA_PLUS: c_ulong = bindgen::XN_FLAG_SEP_COMMA_PLUS as c_ulong;
46pub const XN_FLAG_SEP_CPLUS_SPC: c_ulong = bindgen::XN_FLAG_SEP_CPLUS_SPC as c_ulong;
47pub const XN_FLAG_SEP_SPLUS_SPC: c_ulong = bindgen::XN_FLAG_SEP_SPLUS_SPC as c_ulong;
48pub const XN_FLAG_SEP_MULTILINE: c_ulong = bindgen::XN_FLAG_SEP_MULTILINE as c_ulong;
49pub const XN_FLAG_DN_REV: c_ulong = bindgen::XN_FLAG_DN_REV as c_ulong;
50pub const XN_FLAG_FN_MASK: c_ulong = bindgen::XN_FLAG_FN_MASK as c_ulong;
51pub const XN_FLAG_FN_SN: c_ulong = bindgen::XN_FLAG_FN_SN as c_ulong;
52pub const XN_FLAG_SPC_EQ: c_ulong = bindgen::XN_FLAG_SPC_EQ as c_ulong;
53pub const XN_FLAG_DUMP_UNKNOWN_FIELDS: c_ulong = bindgen::XN_FLAG_DUMP_UNKNOWN_FIELDS as c_ulong;
54pub const XN_FLAG_RFC2253: c_ulong = bindgen::XN_FLAG_RFC2253 as c_ulong;
55pub const XN_FLAG_ONELINE: c_ulong = bindgen::XN_FLAG_ONELINE as c_ulong;
56
57pub fn init() {
58 }
61
62bssl_macros::bssl_enum! {
63 #[derive(Debug, Copy, Clone, PartialEq, Eq)]
65 pub enum LibCode: i32 {
66 None = ERR_LIB_NONE as i32,
68 Sys = ERR_LIB_SYS as i32,
70 Bn = ERR_LIB_BN as i32,
72 Rsa = ERR_LIB_RSA as i32,
74 Dh = ERR_LIB_DH as i32,
76 Evp = ERR_LIB_EVP as i32,
78 Buf = ERR_LIB_BUF as i32,
80 Obj = ERR_LIB_OBJ as i32,
82 Pem = ERR_LIB_PEM as i32,
84 Dsa = ERR_LIB_DSA as i32,
86 X509 = ERR_LIB_X509 as i32,
88 Asn1 = ERR_LIB_ASN1 as i32,
90 Conf = ERR_LIB_CONF as i32,
92 Crypto = ERR_LIB_CRYPTO as i32,
94 Ec = ERR_LIB_EC as i32,
96 Ssl = ERR_LIB_SSL as i32,
98 Bio = ERR_LIB_BIO as i32,
100 Pkcs7 = ERR_LIB_PKCS7 as i32,
102 Pkcs8 = ERR_LIB_PKCS8 as i32,
104 X509v3 = ERR_LIB_X509V3 as i32,
106 Rand = ERR_LIB_RAND as i32,
108 Engine = ERR_LIB_ENGINE as i32,
110 Ocsp = ERR_LIB_OCSP as i32,
112 Ui = ERR_LIB_UI as i32,
114 Comp = ERR_LIB_COMP as i32,
116 Ecdsa = ERR_LIB_ECDSA as i32,
118 Ecdh = ERR_LIB_ECDH as i32,
120 Hmac = ERR_LIB_HMAC as i32,
122 Digest = ERR_LIB_DIGEST as i32,
124 Cipher = ERR_LIB_CIPHER as i32,
126 Hkdf = ERR_LIB_HKDF as i32,
128 TrustToken = ERR_LIB_TRUST_TOKEN as i32,
130 Cms = ERR_LIB_CMS as i32,
132 User = ERR_LIB_USER as i32,
134 }
135}
136
137#[inline]
145pub unsafe fn ERR_GET_REASON_RUST(code: u32) -> core::ffi::c_int {
146 ERR_GET_REASON(code)
147}