Add function to return the name of the FIPS module.

Change-Id: I3eab2393d4fe48c900d67240c7decf223d78c2f1
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/52425
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
diff --git a/crypto/fipsmodule/self_check/fips.c b/crypto/fipsmodule/self_check/fips.c
index 11c9309..ce03957 100644
--- a/crypto/fipsmodule/self_check/fips.c
+++ b/crypto/fipsmodule/self_check/fips.c
@@ -28,6 +28,8 @@
 
 int FIPS_mode_set(int on) { return on == FIPS_mode(); }
 
+const char *FIPS_module_name(void) { return "BoringCrypto"; }
+
 uint32_t FIPS_version(void) {
   return 0;
 }
diff --git a/include/openssl/crypto.h b/include/openssl/crypto.h
index 117b347..b1f696f 100644
--- a/include/openssl/crypto.h
+++ b/include/openssl/crypto.h
@@ -178,6 +178,9 @@
 // |BORINGSSL_FIPS| and zero otherwise.
 OPENSSL_EXPORT int FIPS_mode_set(int on);
 
+// FIPS_module_name returns the name of the FIPS module.
+OPENSSL_EXPORT const char *FIPS_module_name(void);
+
 // FIPS_version returns the version of the FIPS module, or zero if the build
 // isn't exactly at a verified version. The version, expressed in base 10, will
 // be a date in the form yyyymmddXX where XX is often "00", but can be