external/boringssl: Sync to 2c45fa0b90f61b27973fa81893e014fc8c8e8999.

This includes the following changes:

https://boringssl.googlesource.com/boringssl/+log/faa539f877432814d0f2de19846eb99f2ea1e207..2c45fa0b90f61b27973fa81893e014fc8c8e8999

Test: BoringSSL CTS Presubmits
Change-Id: Ie6dc40e0c979168ec73fa1165cbc6e6b83793439
diff --git a/sources.bp b/sources.bp
index cad184c..4780ae9 100644
--- a/sources.bp
+++ b/sources.bp
@@ -18,9 +18,6 @@
     name: "libcrypto_sources",
     srcs: [
         "err_data.c",
-        "src/crypto/aes/aes.c",
-        "src/crypto/aes/key_wrap.c",
-        "src/crypto/aes/mode_wrappers.c",
         "src/crypto/asn1/a_bitstr.c",
         "src/crypto/asn1/a_bool.c",
         "src/crypto/asn1/a_d2i_fp.c",
@@ -93,6 +90,8 @@
         "src/crypto/cipher/cipher.c",
         "src/crypto/cipher/derive_key.c",
         "src/crypto/cipher/e_aes.c",
+        "src/crypto/cipher/e_aesctrhmac.c",
+        "src/crypto/cipher/e_aesgcmsiv.c",
         "src/crypto/cipher/e_chacha20poly1305.c",
         "src/crypto/cipher/e_des.c",
         "src/crypto/cipher/e_null.c",
@@ -117,8 +116,7 @@
         "src/crypto/dh/dh.c",
         "src/crypto/dh/dh_asn1.c",
         "src/crypto/dh/params.c",
-        "src/crypto/digest/digest.c",
-        "src/crypto/digest/digests.c",
+        "src/crypto/digest_extra/digest_extra.c",
         "src/crypto/dsa/dsa.c",
         "src/crypto/dsa/dsa_asn1.c",
         "src/crypto/ec/ec.c",
@@ -144,17 +142,18 @@
         "src/crypto/evp/p_dsa_asn1.c",
         "src/crypto/evp/p_ec.c",
         "src/crypto/evp/p_ec_asn1.c",
+        "src/crypto/evp/p_ed25519.c",
+        "src/crypto/evp/p_ed25519_asn1.c",
         "src/crypto/evp/p_rsa.c",
         "src/crypto/evp/p_rsa_asn1.c",
         "src/crypto/evp/pbkdf.c",
         "src/crypto/evp/print.c",
         "src/crypto/evp/sign.c",
         "src/crypto/ex_data.c",
+        "src/crypto/fipsmodule/bcm.c",
+        "src/crypto/fipsmodule/is_fips.c",
         "src/crypto/hkdf/hkdf.c",
-        "src/crypto/hmac/hmac.c",
         "src/crypto/lhash/lhash.c",
-        "src/crypto/md4/md4.c",
-        "src/crypto/md5/md5.c",
         "src/crypto/mem.c",
         "src/crypto/modes/cbc.c",
         "src/crypto/modes/cfb.c",
@@ -179,7 +178,9 @@
         "src/crypto/poly1305/poly1305_arm.c",
         "src/crypto/poly1305/poly1305_vec.c",
         "src/crypto/pool/pool.c",
+        "src/crypto/rand/ctrdrbg.c",
         "src/crypto/rand/deterministic.c",
+        "src/crypto/rand/forkunsafe.c",
         "src/crypto/rand/fuchsia.c",
         "src/crypto/rand/rand.c",
         "src/crypto/rand/urandom.c",
@@ -192,10 +193,6 @@
         "src/crypto/rsa/rsa.c",
         "src/crypto/rsa/rsa_asn1.c",
         "src/crypto/rsa/rsa_impl.c",
-        "src/crypto/sha/sha1-altivec.c",
-        "src/crypto/sha/sha1.c",
-        "src/crypto/sha/sha256.c",
-        "src/crypto/sha/sha512.c",
         "src/crypto/stack/stack.c",
         "src/crypto/thread.c",
         "src/crypto/thread_none.c",
@@ -288,104 +285,104 @@
     target: {
         android_arm64: {
             srcs: [
-                "linux-aarch64/crypto/aes/aesv8-armx64.S",
                 "linux-aarch64/crypto/bn/armv8-mont.S",
                 "linux-aarch64/crypto/chacha/chacha-armv8.S",
+                "linux-aarch64/crypto/fipsmodule/aesv8-armx64.S",
+                "linux-aarch64/crypto/fipsmodule/sha1-armv8.S",
+                "linux-aarch64/crypto/fipsmodule/sha256-armv8.S",
+                "linux-aarch64/crypto/fipsmodule/sha512-armv8.S",
                 "linux-aarch64/crypto/modes/ghashv8-armx64.S",
-                "linux-aarch64/crypto/sha/sha1-armv8.S",
-                "linux-aarch64/crypto/sha/sha256-armv8.S",
-                "linux-aarch64/crypto/sha/sha512-armv8.S",
             ],
         },
         android_arm: {
             srcs: [
-                "linux-arm/crypto/aes/aes-armv4.S",
-                "linux-arm/crypto/aes/aesv8-armx32.S",
-                "linux-arm/crypto/aes/bsaes-armv7.S",
                 "linux-arm/crypto/bn/armv4-mont.S",
                 "linux-arm/crypto/chacha/chacha-armv4.S",
+                "linux-arm/crypto/fipsmodule/aes-armv4.S",
+                "linux-arm/crypto/fipsmodule/aesv8-armx32.S",
+                "linux-arm/crypto/fipsmodule/bsaes-armv7.S",
+                "linux-arm/crypto/fipsmodule/sha1-armv4-large.S",
+                "linux-arm/crypto/fipsmodule/sha256-armv4.S",
+                "linux-arm/crypto/fipsmodule/sha512-armv4.S",
                 "linux-arm/crypto/modes/ghash-armv4.S",
                 "linux-arm/crypto/modes/ghashv8-armx32.S",
-                "linux-arm/crypto/sha/sha1-armv4-large.S",
-                "linux-arm/crypto/sha/sha256-armv4.S",
-                "linux-arm/crypto/sha/sha512-armv4.S",
                 "src/crypto/curve25519/asm/x25519-asm-arm.S",
                 "src/crypto/poly1305/poly1305_arm_asm.S",
             ],
         },
         android_x86: {
             srcs: [
-                "linux-x86/crypto/aes/aes-586.S",
-                "linux-x86/crypto/aes/aesni-x86.S",
-                "linux-x86/crypto/aes/vpaes-x86.S",
                 "linux-x86/crypto/bn/bn-586.S",
                 "linux-x86/crypto/bn/co-586.S",
                 "linux-x86/crypto/bn/x86-mont.S",
                 "linux-x86/crypto/chacha/chacha-x86.S",
-                "linux-x86/crypto/md5/md5-586.S",
+                "linux-x86/crypto/fipsmodule/aes-586.S",
+                "linux-x86/crypto/fipsmodule/aesni-x86.S",
+                "linux-x86/crypto/fipsmodule/md5-586.S",
+                "linux-x86/crypto/fipsmodule/sha1-586.S",
+                "linux-x86/crypto/fipsmodule/sha256-586.S",
+                "linux-x86/crypto/fipsmodule/sha512-586.S",
+                "linux-x86/crypto/fipsmodule/vpaes-x86.S",
                 "linux-x86/crypto/modes/ghash-x86.S",
-                "linux-x86/crypto/sha/sha1-586.S",
-                "linux-x86/crypto/sha/sha256-586.S",
-                "linux-x86/crypto/sha/sha512-586.S",
             ],
         },
         linux_x86: {
             srcs: [
-                "linux-x86/crypto/aes/aes-586.S",
-                "linux-x86/crypto/aes/aesni-x86.S",
-                "linux-x86/crypto/aes/vpaes-x86.S",
                 "linux-x86/crypto/bn/bn-586.S",
                 "linux-x86/crypto/bn/co-586.S",
                 "linux-x86/crypto/bn/x86-mont.S",
                 "linux-x86/crypto/chacha/chacha-x86.S",
-                "linux-x86/crypto/md5/md5-586.S",
+                "linux-x86/crypto/fipsmodule/aes-586.S",
+                "linux-x86/crypto/fipsmodule/aesni-x86.S",
+                "linux-x86/crypto/fipsmodule/md5-586.S",
+                "linux-x86/crypto/fipsmodule/sha1-586.S",
+                "linux-x86/crypto/fipsmodule/sha256-586.S",
+                "linux-x86/crypto/fipsmodule/sha512-586.S",
+                "linux-x86/crypto/fipsmodule/vpaes-x86.S",
                 "linux-x86/crypto/modes/ghash-x86.S",
-                "linux-x86/crypto/sha/sha1-586.S",
-                "linux-x86/crypto/sha/sha256-586.S",
-                "linux-x86/crypto/sha/sha512-586.S",
             ],
         },
         android_x86_64: {
             srcs: [
-                "linux-x86_64/crypto/aes/aes-x86_64.S",
-                "linux-x86_64/crypto/aes/aesni-x86_64.S",
-                "linux-x86_64/crypto/aes/bsaes-x86_64.S",
-                "linux-x86_64/crypto/aes/vpaes-x86_64.S",
                 "linux-x86_64/crypto/bn/rsaz-avx2.S",
                 "linux-x86_64/crypto/bn/x86_64-mont.S",
                 "linux-x86_64/crypto/bn/x86_64-mont5.S",
                 "linux-x86_64/crypto/chacha/chacha-x86_64.S",
                 "linux-x86_64/crypto/cipher/chacha20_poly1305_x86_64.S",
                 "linux-x86_64/crypto/ec/p256-x86_64-asm.S",
-                "linux-x86_64/crypto/md5/md5-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/aes-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/aesni-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/bsaes-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/md5-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/sha1-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/sha256-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/sha512-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S",
                 "linux-x86_64/crypto/modes/aesni-gcm-x86_64.S",
                 "linux-x86_64/crypto/modes/ghash-x86_64.S",
                 "linux-x86_64/crypto/rand/rdrand-x86_64.S",
-                "linux-x86_64/crypto/sha/sha1-x86_64.S",
-                "linux-x86_64/crypto/sha/sha256-x86_64.S",
-                "linux-x86_64/crypto/sha/sha512-x86_64.S",
                 "src/crypto/curve25519/asm/x25519-asm-x86_64.S",
             ],
         },
         linux_x86_64: {
             srcs: [
-                "linux-x86_64/crypto/aes/aes-x86_64.S",
-                "linux-x86_64/crypto/aes/aesni-x86_64.S",
-                "linux-x86_64/crypto/aes/bsaes-x86_64.S",
-                "linux-x86_64/crypto/aes/vpaes-x86_64.S",
                 "linux-x86_64/crypto/bn/rsaz-avx2.S",
                 "linux-x86_64/crypto/bn/x86_64-mont.S",
                 "linux-x86_64/crypto/bn/x86_64-mont5.S",
                 "linux-x86_64/crypto/chacha/chacha-x86_64.S",
                 "linux-x86_64/crypto/cipher/chacha20_poly1305_x86_64.S",
                 "linux-x86_64/crypto/ec/p256-x86_64-asm.S",
-                "linux-x86_64/crypto/md5/md5-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/aes-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/aesni-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/bsaes-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/md5-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/sha1-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/sha256-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/sha512-x86_64.S",
+                "linux-x86_64/crypto/fipsmodule/vpaes-x86_64.S",
                 "linux-x86_64/crypto/modes/aesni-gcm-x86_64.S",
                 "linux-x86_64/crypto/modes/ghash-x86_64.S",
                 "linux-x86_64/crypto/rand/rdrand-x86_64.S",
-                "linux-x86_64/crypto/sha/sha1-x86_64.S",
-                "linux-x86_64/crypto/sha/sha256-x86_64.S",
-                "linux-x86_64/crypto/sha/sha512-x86_64.S",
                 "src/crypto/curve25519/asm/x25519-asm-x86_64.S",
             ],
         },
@@ -441,11 +438,13 @@
         "src/tool/client.cc",
         "src/tool/const.cc",
         "src/tool/digest.cc",
+        "src/tool/file.cc",
         "src/tool/generate_ed25519.cc",
         "src/tool/genrsa.cc",
         "src/tool/pkcs12.cc",
         "src/tool/rand.cc",
         "src/tool/server.cc",
+        "src/tool/sign.cc",
         "src/tool/speed.cc",
         "src/tool/tool.cc",
         "src/tool/transport_common.cc",
@@ -465,7 +464,9 @@
     name: "boringssl_crypto_test_sources",
     srcs: [
         "src/crypto/asn1/asn1_test.cc",
+        "src/crypto/base64/base64_test.cc",
         "src/crypto/bio/bio_test.cc",
+        "src/crypto/bytestring/bytestring_test.cc",
         "src/crypto/chacha/chacha_test.cc",
         "src/crypto/constant_time_test.cc",
         "src/crypto/curve25519/x25519_test.cc",
@@ -474,6 +475,7 @@
         "src/crypto/ec/ec_test.cc",
         "src/crypto/err/err_test.cc",
         "src/crypto/evp/evp_extra_test.cc",
+        "src/crypto/rand/ctrdrbg_test.cc",
         "src/crypto/rsa/rsa_test.cc",
         "src/crypto/test/gtest_main.cc",
     ],
@@ -490,16 +492,13 @@
 cc_defaults {
     name: "boringssl_tests_sources",
     srcs: [
-        "src/crypto/aes/aes_test.cc",
-        "src/crypto/base64/base64_test.cc",
         "src/crypto/bn/bn_test.cc",
-        "src/crypto/bytestring/bytestring_test.cc",
         "src/crypto/cipher/aead_test.cc",
         "src/crypto/cipher/cipher_test.cc",
         "src/crypto/cmac/cmac_test.cc",
         "src/crypto/curve25519/ed25519_test.cc",
         "src/crypto/curve25519/spake25519_test.cc",
-        "src/crypto/digest/digest_test.cc",
+        "src/crypto/digest_extra/digest_test.cc",
         "src/crypto/ec/example_mul.c",
         "src/crypto/ec/p256-x86_64_test.cc",
         "src/crypto/ecdh/ecdh_test.cc",
@@ -508,8 +507,9 @@
         "src/crypto/ecdsa/ecdsa_verify_test.cc",
         "src/crypto/evp/evp_test.cc",
         "src/crypto/evp/pbkdf_test.cc",
+        "src/crypto/fipsmodule/aes/aes_test.cc",
         "src/crypto/hkdf/hkdf_test.cc",
-        "src/crypto/hmac/hmac_test.cc",
+        "src/crypto/hmac_extra/hmac_test.cc",
         "src/crypto/lhash/lhash_test.cc",
         "src/crypto/modes/gcm_test.cc",
         "src/crypto/obj/obj_test.cc",
@@ -517,6 +517,7 @@
         "src/crypto/pkcs8/pkcs8_test.cc",
         "src/crypto/poly1305/poly1305_test.cc",
         "src/crypto/pool/pool_test.cc",
+        "src/crypto/rand/ctrdrbg_vector_test.cc",
         "src/crypto/refcount_test.cc",
         "src/crypto/thread_test.c",
         "src/crypto/x509/pkcs7_test.c",