[rust] Add HMAC symbols

- Add "HMAC_" to the list of prefixes added by bindgen

SEC-93

Test: Tested //garnet/public/rust/crates/mundane-crypto
Change-Id: I5748088c692ce3fefd71a2fd6ffc8fef307f82a6
diff --git a/rust/boringssl-sys/bindgen.sh b/rust/boringssl-sys/bindgen.sh
index 555924a..8034ba9 100755
--- a/rust/boringssl-sys/bindgen.sh
+++ b/rust/boringssl-sys/bindgen.sh
@@ -27,7 +27,7 @@
 # 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|V_ASN1|ASN1|B_ASN1|CBS_ASN1|CAST|EVP|CBS|CBB|CIPHER|OPENSSL|SSLEAY|DH|DES|DIGEST|DSA|NID|EC|ECDSA|ECDH|SHA|SHA1|SHA224|SHA256|SHA384|SHA512)_.*"
+WHITELIST="(ERR|BIO|CRYPTO|V_ASN1|ASN1|B_ASN1|CBS_ASN1|CAST|EVP|CBS|CBB|CIPHER|OPENSSL|SSLEAY|DH|DES|DIGEST|DSA|NID|EC|ECDSA|ECDH|SHA|SHA1|SHA224|SHA256|SHA384|SHA512|HMAC)_.*"
 # 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 83d5f80..48d6cf5 100644
--- a/rust/boringssl-sys/src/lib.rs
+++ b/rust/boringssl-sys/src/lib.rs
@@ -1830,6 +1830,7 @@
 }
 pub type EVP_PKEY_METHOD = evp_pkey_method_st;
 pub type EVP_PKEY = evp_pkey_st;
+pub type HMAC_CTX = hmac_ctx_st;
 #[repr(C)]
 #[derive(Debug, Copy, Clone)]
 pub struct ossl_init_settings_st {
@@ -9956,6 +9957,122 @@
     );
 }
 extern "C" {
+    pub fn HMAC_CTX_init(ctx: *mut HMAC_CTX);
+}
+extern "C" {
+    pub fn HMAC_CTX_new() -> *mut HMAC_CTX;
+}
+extern "C" {
+    pub fn HMAC_CTX_cleanup(ctx: *mut HMAC_CTX);
+}
+extern "C" {
+    pub fn HMAC_CTX_free(ctx: *mut HMAC_CTX);
+}
+extern "C" {
+    pub fn HMAC_Init_ex(
+        ctx: *mut HMAC_CTX,
+        key: *const ::std::os::raw::c_void,
+        key_len: usize,
+        md: *const EVP_MD,
+        impl_: *mut ENGINE,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn HMAC_Update(
+        ctx: *mut HMAC_CTX,
+        data: *const u8,
+        data_len: usize,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn HMAC_Final(
+        ctx: *mut HMAC_CTX,
+        out: *mut u8,
+        out_len: *mut ::std::os::raw::c_uint,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn HMAC_size(ctx: *const HMAC_CTX) -> usize;
+}
+extern "C" {
+    pub fn HMAC_CTX_copy_ex(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn HMAC_CTX_reset(ctx: *mut HMAC_CTX);
+}
+extern "C" {
+    pub fn HMAC_Init(
+        ctx: *mut HMAC_CTX,
+        key: *const ::std::os::raw::c_void,
+        key_len: ::std::os::raw::c_int,
+        md: *const EVP_MD,
+    ) -> ::std::os::raw::c_int;
+}
+extern "C" {
+    pub fn HMAC_CTX_copy(dest: *mut HMAC_CTX, src: *const HMAC_CTX) -> ::std::os::raw::c_int;
+}
+#[repr(C)]
+#[derive(Debug, Copy, Clone)]
+pub struct hmac_ctx_st {
+    pub md: *const EVP_MD,
+    pub md_ctx: EVP_MD_CTX,
+    pub i_ctx: EVP_MD_CTX,
+    pub o_ctx: EVP_MD_CTX,
+}
+#[test]
+fn bindgen_test_layout_hmac_ctx_st() {
+    assert_eq!(
+        ::std::mem::size_of::<hmac_ctx_st>(),
+        104usize,
+        concat!("Size of: ", stringify!(hmac_ctx_st))
+    );
+    assert_eq!(
+        ::std::mem::align_of::<hmac_ctx_st>(),
+        8usize,
+        concat!("Alignment of ", stringify!(hmac_ctx_st))
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<hmac_ctx_st>())).md as *const _ as usize },
+        0usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(hmac_ctx_st),
+            "::",
+            stringify!(md)
+        )
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<hmac_ctx_st>())).md_ctx as *const _ as usize },
+        8usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(hmac_ctx_st),
+            "::",
+            stringify!(md_ctx)
+        )
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<hmac_ctx_st>())).i_ctx as *const _ as usize },
+        40usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(hmac_ctx_st),
+            "::",
+            stringify!(i_ctx)
+        )
+    );
+    assert_eq!(
+        unsafe { &(*(::std::ptr::null::<hmac_ctx_st>())).o_ctx as *const _ as usize },
+        72usize,
+        concat!(
+            "Offset of field: ",
+            stringify!(hmac_ctx_st),
+            "::",
+            stringify!(o_ctx)
+        )
+    );
+}
+extern "C" {
     pub fn CRYPTO_BUFFER_POOL_new() -> *mut CRYPTO_BUFFER_POOL;
 }
 extern "C" {