[boringssl-sys] Expose `AES`, `MD5`, and `RC4` functions.

This change exposes `AES`, `MD5`, and `RC4` functions by introducing a
non-postfixed group in the symbol whitelist and executing `bindgen.sh`,
which was missed in fxr/411201. Rust `bindgen` has also been pinned to
version 0.54.0 and used to regenerate bindings.

Both MD5 and RC4 are known to be insecure. These APIs are exposed by
Mundane and used to implement legacy protocols. Mundane annotates all
insecure crypto APIs as deprecated and prefixes all items with
"insecure". Moreover, insecure APIs are exposed in a module that is only
built when a specific feature flag is used. See Mundane's `insecure`
module documentation for more:
https://docs.rs/mundane/0.4.3/mundane/insecure/index.html

AES is a secure cipher, but non-AE modes of AES are dangerous and easily
misused. In particular, non-AE modes do not authenticate ciphertext.
Mundane plans to expose secure modes of AES like AES-GCM and, until it
can expose known insecure AES APIs like RFC 3394 key wrapping, these
will be wrapped directly by crates that implement legacy protocols. See
KMS for example:
https://fuchsia.googlesource.com/fuchsia/+/refs/heads/master/src/security/kms

Change-Id: I0ea096ec95c660901b83704d8a4dfd3ec85b7530
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/boringssl/+/411782
Reviewed-by: Aaron Green <aarongreen@google.com>
Reviewed-by: Drew Fisher <zarvox@google.com>
Reviewed-by: Darren Krahn <dkrahn@google.com>
Commit-Queue: Sean Olson <seanolson@google.com>
diff --git a/rust/boringssl-sys/bindgen.sh b/rust/boringssl-sys/bindgen.sh
index 7aa3165..8369632 100755
--- a/rust/boringssl-sys/bindgen.sh
+++ b/rust/boringssl-sys/bindgen.sh
@@ -25,7 +25,7 @@
 # changing the Rust types that are generated for particular C types). If a more
 # recent version of bindgen is available, "roll" bindgen by updating the
 # `BINDGEN_EXPECTED_VERSION` variable here.
-BINDGEN_EXPECTED_VERSION="bindgen 0.53.2"
+BINDGEN_EXPECTED_VERSION="bindgen 0.54.0"
 BINDGEN_GOT_VERSION="$(bindgen --version)"
 if [ "$BINDGEN_GOT_VERSION" != "$BINDGEN_EXPECTED_VERSION" ]; then
     echo "Unexpected version of bindgen: got $BINDGEN_GOT_VERSION; wanted $BINDGEN_EXPECTED_VERSION.
@@ -53,8 +53,10 @@
 
 # Whitelist BoringSSL-related symbols so we don't get non-BoringSSL symbols such
 # as platform-specific symbols (specific to the platform that is running
-# 'bindgen') and other C standard library symbols.
-WHITELIST="(ERR|BIO|CRYPTO|RAND|V_ASN1|ASN1|B_ASN1|CBS_ASN1|CAST|EVP|CBS|CBB|CIPHER|OPENSSL|SSLEAY|DH|DES|DIGEST|DSA|NID|EC|ECDSA|ECDH|ED25519|X25519|PKCS5_PBKDF2|SHA|SHA1|SHA224|SHA256|SHA384|SHA512|HMAC|RSA|BN|RC4|MD5)_.*"
+# 'bindgen') and other C standard library symbols. The whitelist is broken into
+# two sections: symbols with a prefix followed by an underscore and symbols with
+# no following characters, such as the `RC4` function.
+WHITELIST="((AES|ERR|BIO|CRYPTO|RAND|V_ASN1|ASN1|B_ASN1|CBS_ASN1|CAST|EVP|CBS|CBB|CIPHER|OPENSSL|SSLEAY|DH|DES|DIGEST|DSA|NID|EC|ECDSA|ECDH|ED25519|X25519|PKCS5_PBKDF2|SHA|SHA1|SHA224|SHA256|SHA384|SHA512|HMAC|RSA|BN|RC4|MD5)_.*)|(RC4)$"
 # NOTE(joshlf) on --target: Currently, we just pass x86_64 since none of the
 # symbols we're linking against are architecture-specific (they may be
 # word-size-specific, but Fuchsia only targets 64-bit platforms). If this ever
diff --git a/rust/boringssl-sys/src/lib.rs b/rust/boringssl-sys/src/lib.rs
index 431204a..c436598 100644
--- a/rust/boringssl-sys/src/lib.rs
+++ b/rust/boringssl-sys/src/lib.rs
@@ -83,6 +83,10 @@
 pub const EVP_AEAD_MAX_NONCE_LENGTH: u32 = 24;
 pub const EVP_AEAD_MAX_OVERHEAD: u32 = 64;
 pub const EVP_AEAD_DEFAULT_TAG_LENGTH: u32 = 0;
+pub const AES_ENCRYPT: u32 = 1;
+pub const AES_DECRYPT: u32 = 0;
+pub const AES_MAXNR: u32 = 14;
+pub const AES_BLOCK_SIZE: u32 = 16;
 pub const ERR_FLAG_STRING: u32 = 1;
 pub const ERR_R_FATAL: u32 = 64;
 pub const ERR_R_MALLOC_FAILURE: u32 = 65;
@@ -602,6 +606,7 @@
 pub const SHA384_DIGEST_LENGTH: u32 = 48;
 pub const SHA512_CBLOCK: u32 = 128;
 pub const SHA512_DIGEST_LENGTH: u32 = 64;
+pub const SHA512_256_DIGEST_LENGTH: u32 = 32;
 pub const RAND_MAX: u32 = 2147483647;
 pub const OPENSSL_VERSION_TEXT: &'static [u8; 38usize] = b"OpenSSL 1.1.0 (compatible; BoringSSL)\0";
 pub const OPENSSL_VERSION: u32 = 0;
@@ -858,7 +863,11 @@
 pub const NID_crl_reason: u32 = 141;
 pub const NID_invalidity_date: u32 = 142;
 pub const NID_sxnet: u32 = 143;
+pub const SN_pbe_WithSHA1And128BitRC4: &'static [u8; 17usize] = b"PBE-SHA1-RC4-128\0";
+pub const LN_pbe_WithSHA1And128BitRC4: &'static [u8; 24usize] = b"pbeWithSHA1And128BitRC4\0";
 pub const NID_pbe_WithSHA1And128BitRC4: u32 = 144;
+pub const SN_pbe_WithSHA1And40BitRC4: &'static [u8; 16usize] = b"PBE-SHA1-RC4-40\0";
+pub const LN_pbe_WithSHA1And40BitRC4: &'static [u8; 23usize] = b"pbeWithSHA1And40BitRC4\0";
 pub const NID_pbe_WithSHA1And40BitRC4: u32 = 145;
 pub const NID_pbe_WithSHA1And3_Key_TripleDES_CBC: u32 = 146;
 pub const NID_pbe_WithSHA1And2_Key_TripleDES_CBC: u32 = 147;
@@ -1669,6 +1678,7 @@
 pub const NID_CECPQ2: u32 = 959;
 pub const NID_ED448: u32 = 960;
 pub const NID_X448: u32 = 961;
+pub const NID_sha512_256: u32 = 962;
 pub const EVP_PKEY_NONE: u32 = 0;
 pub const EVP_PKEY_RSA: u32 = 6;
 pub const EVP_PKEY_RSA_PSS: u32 = 912;
@@ -1716,6 +1726,8 @@
 pub const EVP_R_INVALID_PARAMETERS: u32 = 133;
 pub const EVP_R_INVALID_PEER_KEY: u32 = 134;
 pub const EVP_R_NOT_XOF_OR_INVALID_LENGTH: u32 = 135;
+pub const MD5_CBLOCK: u32 = 64;
+pub const MD5_DIGEST_LENGTH: u32 = 16;
 pub const RSA_PKCS1_PADDING: u32 = 1;
 pub const RSA_NO_PADDING: u32 = 3;
 pub const RSA_PKCS1_OAEP_PADDING: u32 = 4;
@@ -1778,6 +1790,7 @@
 pub const OPENSSL_NPN_UNSUPPORTED: u32 = 0;
 pub const OPENSSL_NPN_NEGOTIATED: u32 = 1;
 pub const OPENSSL_NPN_NO_OVERLAP: u32 = 2;
+pub const SSL_TXT_RC4: &'static [u8; 4usize] = b"RC4\0";
 pub const OPENSSL_INIT_NO_LOAD_SSL_STRINGS: u32 = 0;
 pub const OPENSSL_INIT_LOAD_SSL_STRINGS: u32 = 0;
 pub const OPENSSL_INIT_SSL_DEFAULT: u32 = 0;
@@ -1925,14 +1938,21 @@
 pub type EVP_PKEY_METHOD = evp_pkey_method_st;
 pub type EVP_PKEY = evp_pkey_st;
 pub type HMAC_CTX = hmac_ctx_st;
+pub type MD5_CTX = md5_state_st;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct ossl_init_settings_st {
     _unused: [u8; 0],
 }
 pub type OPENSSL_INIT_SETTINGS = ossl_init_settings_st;
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct pkcs8_priv_key_info_st {
+    _unused: [u8; 0],
+}
 pub type PKCS8_PRIV_KEY_INFO = pkcs8_priv_key_info_st;
 pub type RAND_METHOD = rand_meth_st;
+pub type RC4_KEY = rc4_key_st;
 pub type RSA_METHOD = rsa_meth_st;
 pub type RSA = rsa_st;
 pub type SHA256_CTX = sha256_state_st;
@@ -2239,6 +2259,144 @@
         extra_in_len: size_t,
     ) -> ::std::os::raw::c_int;
 }
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct aes_key_st {
+    pub rd_key: [u32; 60usize],
+    pub rounds: ::std::os::raw::c_uint,
+}
+#[test]
+fn bindgen_test_layout_aes_key_st() {
+    assert_eq!(
+        ::std::mem::size_of::<aes_key_st>(),
+        244usize,
+        concat!("Size of: ", stringify!(aes_key_st))
+    );
+    assert_eq!(
+        ::std::mem::align_of::<aes_key_st>(),
+        4usize,
+        concat!("Alignment of ", stringify!(aes_key_st))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<aes_key_st>())).rd_key as *const _ as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(aes_key_st), "::", stringify!(rd_key))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<aes_key_st>())).rounds as *const _ as usize },
+        240usize,
+        concat!("Offset of field: ", stringify!(aes_key_st), "::", stringify!(rounds))
+    );
+}
+pub type AES_KEY = aes_key_st;
+extern "C" {
+    pub fn AES_set_encrypt_key(
+        key: *const u8,
+        bits: ::std::os::raw::c_uint,
+        aeskey: *mut AES_KEY,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn AES_set_decrypt_key(
+        key: *const u8,
+        bits: ::std::os::raw::c_uint,
+        aeskey: *mut AES_KEY,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn AES_encrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY);
+}
+extern "C" {
+    pub fn AES_decrypt(in_: *const u8, out: *mut u8, key: *const AES_KEY);
+}
+extern "C" {
+    pub fn AES_ctr128_encrypt(
+        in_: *const u8,
+        out: *mut u8,
+        len: size_t,
+        key: *const AES_KEY,
+        ivec: *mut u8,
+        ecount_buf: *mut u8,
+        num: *mut ::std::os::raw::c_uint,
+    );
+}
+extern "C" {
+    pub fn AES_ecb_encrypt(
+        in_: *const u8,
+        out: *mut u8,
+        key: *const AES_KEY,
+        enc: ::std::os::raw::c_int,
+    );
+}
+extern "C" {
+    pub fn AES_cbc_encrypt(
+        in_: *const u8,
+        out: *mut u8,
+        len: size_t,
+        key: *const AES_KEY,
+        ivec: *mut u8,
+        enc: ::std::os::raw::c_int,
+    );
+}
+extern "C" {
+    pub fn AES_ofb128_encrypt(
+        in_: *const u8,
+        out: *mut u8,
+        len: size_t,
+        key: *const AES_KEY,
+        ivec: *mut u8,
+        num: *mut ::std::os::raw::c_int,
+    );
+}
+extern "C" {
+    pub fn AES_cfb128_encrypt(
+        in_: *const u8,
+        out: *mut u8,
+        len: size_t,
+        key: *const AES_KEY,
+        ivec: *mut u8,
+        num: *mut ::std::os::raw::c_int,
+        enc: ::std::os::raw::c_int,
+    );
+}
+extern "C" {
+    pub fn AES_wrap_key(
+        key: *const AES_KEY,
+        iv: *const u8,
+        out: *mut u8,
+        in_: *const u8,
+        in_len: size_t,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn AES_unwrap_key(
+        key: *const AES_KEY,
+        iv: *const u8,
+        out: *mut u8,
+        in_: *const u8,
+        in_len: size_t,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn AES_wrap_key_padded(
+        key: *const AES_KEY,
+        out: *mut u8,
+        out_len: *mut size_t,
+        max_out: size_t,
+        in_: *const u8,
+        in_len: size_t,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn AES_unwrap_key_padded(
+        key: *const AES_KEY,
+        out: *mut u8,
+        out_len: *mut size_t,
+        max_out: size_t,
+        in_: *const u8,
+        in_len: size_t,
+    ) -> ::std::os::raw::c_int;
+}
 pub type va_list = __builtin_va_list;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
@@ -2419,8 +2577,8 @@
 pub const ERR_LIB_DIGEST: _bindgen_ty_1 = 29;
 pub const ERR_LIB_CIPHER: _bindgen_ty_1 = 30;
 pub const ERR_LIB_HKDF: _bindgen_ty_1 = 31;
-pub const ERR_LIB_USER: _bindgen_ty_1 = 32;
-pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 33;
+pub const ERR_LIB_TRUST_TOKEN: _bindgen_ty_1 = 32;
+pub const ERR_LIB_USER: _bindgen_ty_1 = 33;
 pub const ERR_NUM_LIBS: _bindgen_ty_1 = 34;
 pub type _bindgen_ty_1 = u32;
 extern "C" {
@@ -4694,7 +4852,7 @@
     pub static ASN1_ANY_it: ASN1_ITEM;
 }
 extern "C" {
-    pub fn ASN1_TYPE_get(a: *mut ASN1_TYPE) -> ::std::os::raw::c_int;
+    pub fn ASN1_TYPE_get(a: *const ASN1_TYPE) -> ::std::os::raw::c_int;
 }
 extern "C" {
     pub fn ASN1_TYPE_set(
@@ -4764,7 +4922,7 @@
     pub fn ASN1_STRING_length_set(x: *mut ASN1_STRING, n: ::std::os::raw::c_int);
 }
 extern "C" {
-    pub fn ASN1_STRING_type(x: *mut ASN1_STRING) -> ::std::os::raw::c_int;
+    pub fn ASN1_STRING_type(x: *const ASN1_STRING) -> ::std::os::raw::c_int;
 }
 extern "C" {
     pub fn ASN1_STRING_data(x: *mut ASN1_STRING) -> *mut ::std::os::raw::c_uchar;
@@ -4797,13 +4955,13 @@
 }
 extern "C" {
     pub fn ASN1_BIT_STRING_get_bit(
-        a: *mut ASN1_BIT_STRING,
+        a: *const ASN1_BIT_STRING,
         n: ::std::os::raw::c_int,
     ) -> ::std::os::raw::c_int;
 }
 extern "C" {
     pub fn ASN1_BIT_STRING_check(
-        a: *mut ASN1_BIT_STRING,
+        a: *const ASN1_BIT_STRING,
         flags: *mut ::std::os::raw::c_uchar,
         flags_len: ::std::os::raw::c_int,
     ) -> ::std::os::raw::c_int;
@@ -5046,11 +5204,11 @@
     ) -> *mut ASN1_TIME;
 }
 extern "C" {
-    pub fn ASN1_TIME_check(t: *mut ASN1_TIME) -> ::std::os::raw::c_int;
+    pub fn ASN1_TIME_check(t: *const ASN1_TIME) -> ::std::os::raw::c_int;
 }
 extern "C" {
     pub fn ASN1_TIME_to_generalizedtime(
-        t: *mut ASN1_TIME,
+        t: *const ASN1_TIME,
         out: *mut *mut ASN1_GENERALIZEDTIME,
     ) -> *mut ASN1_GENERALIZEDTIME;
 }
@@ -5094,14 +5252,16 @@
     ) -> ::std::os::raw::c_int;
 }
 extern "C" {
-    pub fn ASN1_ENUMERATED_get(a: *mut ASN1_ENUMERATED) -> ::std::os::raw::c_long;
+    pub fn ASN1_ENUMERATED_get(a: *const ASN1_ENUMERATED) -> ::std::os::raw::c_long;
 }
 extern "C" {
-    pub fn BN_to_ASN1_ENUMERATED(bn: *mut BIGNUM, ai: *mut ASN1_ENUMERATED)
-        -> *mut ASN1_ENUMERATED;
+    pub fn BN_to_ASN1_ENUMERATED(
+        bn: *const BIGNUM,
+        ai: *mut ASN1_ENUMERATED,
+    ) -> *mut ASN1_ENUMERATED;
 }
 extern "C" {
-    pub fn ASN1_ENUMERATED_to_BN(ai: *mut ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM;
+    pub fn ASN1_ENUMERATED_to_BN(ai: *const ASN1_ENUMERATED, bn: *mut BIGNUM) -> *mut BIGNUM;
 }
 extern "C" {
     pub fn ASN1_PRINTABLE_type(
@@ -5163,7 +5323,7 @@
 extern "C" {
     pub fn ASN1_STRING_print_ex_fp(
         fp: *mut FILE,
-        str: *mut ASN1_STRING,
+        str: *const ASN1_STRING,
         flags: ::std::os::raw::c_ulong,
     ) -> ::std::os::raw::c_int;
 }
@@ -5205,7 +5365,7 @@
 extern "C" {
     pub fn ASN1_STRING_print_ex(
         out: *mut BIO,
-        str: *mut ASN1_STRING,
+        str: *const ASN1_STRING,
         flags: ::std::os::raw::c_ulong,
     ) -> ::std::os::raw::c_int;
 }
@@ -5214,7 +5374,7 @@
 }
 extern "C" {
     pub fn ASN1_item_unpack(
-        oct: *mut ASN1_STRING,
+        oct: *const ASN1_STRING,
         it: *const ASN1_ITEM,
     ) -> *mut ::std::os::raw::c_void;
 }
@@ -5310,13 +5470,13 @@
 }
 extern "C" {
     pub fn ASN1_generate_nconf(
-        str: *mut ::std::os::raw::c_char,
+        str: *const ::std::os::raw::c_char,
         nconf: *mut CONF,
     ) -> *mut ASN1_TYPE;
 }
 extern "C" {
     pub fn ASN1_generate_v3(
-        str: *mut ::std::os::raw::c_char,
+        str: *const ::std::os::raw::c_char,
         cnf: *mut X509V3_CTX,
     ) -> *mut ASN1_TYPE;
 }
@@ -7262,6 +7422,15 @@
         concat!("Offset of field: ", stringify!(evp_cipher_st), "::", stringify!(ctrl))
     );
 }
+extern "C" {
+    pub fn AES_CMAC(
+        out: *mut u8,
+        key: *const u8,
+        key_len: size_t,
+        in_: *const u8,
+        in_len: size_t,
+    ) -> ::std::os::raw::c_int;
+}
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct stack_st_CONF_VALUE {
@@ -7614,6 +7783,22 @@
     );
 }
 extern "C" {
+    pub fn SHA512_256_Init(sha: *mut SHA512_CTX) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn SHA512_256_Update(
+        sha: *mut SHA512_CTX,
+        data: *const ::std::os::raw::c_void,
+        len: size_t,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn SHA512_256_Final(out: *mut u8, sha: *mut SHA512_CTX) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn SHA512_256(data: *const u8, len: size_t, out: *mut u8) -> *mut u8;
+}
+extern "C" {
     pub fn OPENSSL_malloc(size: size_t) -> *mut ::std::os::raw::c_void;
 }
 extern "C" {
@@ -7715,6 +7900,9 @@
     pub fn CRYPTO_has_asm() -> ::std::os::raw::c_int;
 }
 extern "C" {
+    pub fn CRYPTO_pre_sandbox_init();
+}
+extern "C" {
     pub fn CRYPTO_malloc_init() -> ::std::os::raw::c_int;
 }
 extern "C" {
@@ -8169,6 +8357,9 @@
     pub fn EVP_sha512() -> *const EVP_MD;
 }
 extern "C" {
+    pub fn EVP_sha512_256() -> *const EVP_MD;
+}
+extern "C" {
     pub fn EVP_md5_sha1() -> *const EVP_MD;
 }
 extern "C" {
@@ -10068,6 +10259,69 @@
     );
 }
 extern "C" {
+    pub fn MD5_Init(md5: *mut MD5_CTX) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn MD5_Update(
+        md5: *mut MD5_CTX,
+        data: *const ::std::os::raw::c_void,
+        len: size_t,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn MD5_Final(out: *mut u8, md5: *mut MD5_CTX) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn MD5_Transform(md5: *mut MD5_CTX, block: *const u8);
+}
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct md5_state_st {
+    pub h: [u32; 4usize],
+    pub Nl: u32,
+    pub Nh: u32,
+    pub data: [u8; 64usize],
+    pub num: ::std::os::raw::c_uint,
+}
+#[test]
+fn bindgen_test_layout_md5_state_st() {
+    assert_eq!(
+        ::std::mem::size_of::<md5_state_st>(),
+        92usize,
+        concat!("Size of: ", stringify!(md5_state_st))
+    );
+    assert_eq!(
+        ::std::mem::align_of::<md5_state_st>(),
+        4usize,
+        concat!("Alignment of ", stringify!(md5_state_st))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<md5_state_st>())).h as *const _ as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(md5_state_st), "::", stringify!(h))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<md5_state_st>())).Nl as *const _ as usize },
+        16usize,
+        concat!("Offset of field: ", stringify!(md5_state_st), "::", stringify!(Nl))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<md5_state_st>())).Nh as *const _ as usize },
+        20usize,
+        concat!("Offset of field: ", stringify!(md5_state_st), "::", stringify!(Nh))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<md5_state_st>())).data as *const _ as usize },
+        24usize,
+        concat!("Offset of field: ", stringify!(md5_state_st), "::", stringify!(data))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<md5_state_st>())).num as *const _ as usize },
+        88usize,
+        concat!("Offset of field: ", stringify!(md5_state_st), "::", stringify!(num))
+    );
+}
+extern "C" {
     pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL;
 }
 extern "C" {
@@ -10624,12 +10878,13 @@
     pub num_blindings: ::std::os::raw::c_uint,
     pub blindings: *mut *mut BN_BLINDING,
     pub blindings_inuse: *mut ::std::os::raw::c_uchar,
+    pub blinding_fork_generation: u64,
     pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
     pub __bindgen_padding_0: [u8; 7usize],
 }
 #[test]
 fn bindgen_test_layout_rsa_st() {
-    assert_eq!(::std::mem::size_of::<rsa_st>(), 232usize, concat!("Size of: ", stringify!(rsa_st)));
+    assert_eq!(::std::mem::size_of::<rsa_st>(), 240usize, concat!("Size of: ", stringify!(rsa_st)));
     assert_eq!(
         ::std::mem::align_of::<rsa_st>(),
         8usize,
@@ -10755,6 +11010,16 @@
         216usize,
         concat!("Offset of field: ", stringify!(rsa_st), "::", stringify!(blindings_inuse))
     );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<rsa_st>())).blinding_fork_generation as *const _ as usize },
+        224usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(rsa_st),
+            "::",
+            stringify!(blinding_fork_generation)
+        )
+    );
 }
 impl rsa_st {
     #[inline]
@@ -11147,7 +11412,6 @@
     pub sig_alg: *mut X509_ALGOR,
     pub signature: *mut ASN1_BIT_STRING,
     pub references: CRYPTO_refcount_t,
-    pub name: *mut ::std::os::raw::c_char,
     pub ex_data: CRYPTO_EX_DATA,
     pub ex_pathlen: ::std::os::raw::c_long,
     pub ex_pcpathlen: ::std::os::raw::c_long,
@@ -11170,7 +11434,7 @@
 fn bindgen_test_layout_x509_st() {
     assert_eq!(
         ::std::mem::size_of::<x509_st>(),
-        240usize,
+        232usize,
         concat!("Size of: ", stringify!(x509_st))
     );
     assert_eq!(
@@ -11199,93 +11463,88 @@
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(references))
     );
     assert_eq!(
-        unsafe { &(*(::std::ptr::null::<x509_st>())).name as *const _ as usize },
-        32usize,
-        concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(name))
-    );
-    assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).ex_data as *const _ as usize },
-        40usize,
+        32usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(ex_data))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).ex_pathlen as *const _ as usize },
-        48usize,
+        40usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(ex_pathlen))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).ex_pcpathlen as *const _ as usize },
-        56usize,
+        48usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(ex_pcpathlen))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).ex_flags as *const _ as usize },
-        64usize,
+        56usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(ex_flags))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).ex_kusage as *const _ as usize },
-        72usize,
+        64usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(ex_kusage))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).ex_xkusage as *const _ as usize },
-        80usize,
+        72usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(ex_xkusage))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).ex_nscert as *const _ as usize },
-        88usize,
+        80usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(ex_nscert))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).skid as *const _ as usize },
-        96usize,
+        88usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(skid))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).akid as *const _ as usize },
-        104usize,
+        96usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(akid))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).policy_cache as *const _ as usize },
-        112usize,
+        104usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(policy_cache))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).crldp as *const _ as usize },
-        120usize,
+        112usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(crldp))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).altname as *const _ as usize },
-        128usize,
+        120usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(altname))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).nc as *const _ as usize },
-        136usize,
+        128usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(nc))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).sha1_hash as *const _ as usize },
-        144usize,
+        136usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(sha1_hash))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).aux as *const _ as usize },
-        168usize,
+        160usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(aux))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).buf as *const _ as usize },
-        176usize,
+        168usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(buf))
     );
     assert_eq!(
         unsafe { &(*(::std::ptr::null::<x509_st>())).lock as *const _ as usize },
-        184usize,
+        176usize,
         concat!("Offset of field: ", stringify!(x509_st), "::", stringify!(lock))
     );
 }
@@ -11471,60 +11730,6 @@
         concat!("Offset of field: ", stringify!(X509_crl_st), "::", stringify!(meth_data))
     );
 }
-#[repr(C)]
-#[derive(Debug, Copy, Clone)]
-pub struct pkcs8_priv_key_info_st {
-    pub broken: ::std::os::raw::c_int,
-    pub version: *mut ASN1_INTEGER,
-    pub pkeyalg: *mut X509_ALGOR,
-    pub pkey: *mut ASN1_TYPE,
-    pub attributes: *mut stack_st_X509_ATTRIBUTE,
-}
-#[test]
-fn bindgen_test_layout_pkcs8_priv_key_info_st() {
-    assert_eq!(
-        ::std::mem::size_of::<pkcs8_priv_key_info_st>(),
-        40usize,
-        concat!("Size of: ", stringify!(pkcs8_priv_key_info_st))
-    );
-    assert_eq!(
-        ::std::mem::align_of::<pkcs8_priv_key_info_st>(),
-        8usize,
-        concat!("Alignment of ", stringify!(pkcs8_priv_key_info_st))
-    );
-    assert_eq!(
-        unsafe { &(*(::std::ptr::null::<pkcs8_priv_key_info_st>())).broken as *const _ as usize },
-        0usize,
-        concat!("Offset of field: ", stringify!(pkcs8_priv_key_info_st), "::", stringify!(broken))
-    );
-    assert_eq!(
-        unsafe { &(*(::std::ptr::null::<pkcs8_priv_key_info_st>())).version as *const _ as usize },
-        8usize,
-        concat!("Offset of field: ", stringify!(pkcs8_priv_key_info_st), "::", stringify!(version))
-    );
-    assert_eq!(
-        unsafe { &(*(::std::ptr::null::<pkcs8_priv_key_info_st>())).pkeyalg as *const _ as usize },
-        16usize,
-        concat!("Offset of field: ", stringify!(pkcs8_priv_key_info_st), "::", stringify!(pkeyalg))
-    );
-    assert_eq!(
-        unsafe { &(*(::std::ptr::null::<pkcs8_priv_key_info_st>())).pkey as *const _ as usize },
-        24usize,
-        concat!("Offset of field: ", stringify!(pkcs8_priv_key_info_st), "::", stringify!(pkey))
-    );
-    assert_eq!(
-        unsafe {
-            &(*(::std::ptr::null::<pkcs8_priv_key_info_st>())).attributes as *const _ as usize
-        },
-        32usize,
-        concat!(
-            "Offset of field: ",
-            stringify!(pkcs8_priv_key_info_st),
-            "::",
-            stringify!(attributes)
-        )
-    );
-}
 extern "C" {
     pub fn ASN1_digest(
         i2d: i2d_of_void,
@@ -11579,12 +11784,6 @@
 extern "C" {
     pub fn EVP_PKEY2PKCS8(pkey: *mut EVP_PKEY) -> *mut PKCS8_PRIV_KEY_INFO;
 }
-extern "C" {
-    pub fn EVP_PKEY2PKCS8_broken(
-        pkey: *mut EVP_PKEY,
-        broken: ::std::os::raw::c_int,
-    ) -> *mut PKCS8_PRIV_KEY_INFO;
-}
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct rsa_pss_params_st {
@@ -11665,9 +11864,6 @@
     pub fn RAND_cleanup();
 }
 extern "C" {
-    pub fn RAND_set_urandom_fd(fd: ::std::os::raw::c_int);
-}
-extern "C" {
     pub fn RAND_enable_fork_unsafe_buffering(fd: ::std::os::raw::c_int);
 }
 extern "C" {
@@ -11774,6 +11970,50 @@
 extern "C" {
     pub fn RAND_set_rand_method(arg1: *const RAND_METHOD);
 }
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct rc4_key_st {
+    pub x: u32,
+    pub y: u32,
+    pub data: [u32; 256usize],
+}
+#[test]
+fn bindgen_test_layout_rc4_key_st() {
+    assert_eq!(
+        ::std::mem::size_of::<rc4_key_st>(),
+        1032usize,
+        concat!("Size of: ", stringify!(rc4_key_st))
+    );
+    assert_eq!(
+        ::std::mem::align_of::<rc4_key_st>(),
+        4usize,
+        concat!("Alignment of ", stringify!(rc4_key_st))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<rc4_key_st>())).x as *const _ as usize },
+        0usize,
+        concat!("Offset of field: ", stringify!(rc4_key_st), "::", stringify!(x))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<rc4_key_st>())).y as *const _ as usize },
+        4usize,
+        concat!("Offset of field: ", stringify!(rc4_key_st), "::", stringify!(y))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<rc4_key_st>())).data as *const _ as usize },
+        8usize,
+        concat!("Offset of field: ", stringify!(rc4_key_st), "::", stringify!(data))
+    );
+}
+extern "C" {
+    pub fn RC4_set_key(rc4key: *mut RC4_KEY, len: ::std::os::raw::c_uint, key: *const u8);
+}
+extern "C" {
+    pub fn RC4(key: *mut RC4_KEY, len: size_t, in_: *const u8, out: *mut u8);
+}
+extern "C" {
+    pub fn RC4_options() -> *const ::std::os::raw::c_char;
+}
 extern "C" {
     pub fn ERR_load_SSL_strings();
 }