modulewrappers: use the correct bssl namespace.

These are binaries, so in theory it does not matter - in practice it
ensures `namespace bssl {` occurs nowhere except in the
`BSSL_NAMESPACE_BEGIN` macro, ensuring the inline namespace for
prefixing is always respected.

Bug: 472444080
Change-Id: I8c8c87769fa92554fc25ac950be61da6866b5c76
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/86427
Auto-Submit: Rudolf Polzer <rpolzer@google.com>
Reviewed-by: Xiangfei Ding <xfding@google.com>
Commit-Queue: Rudolf Polzer <rpolzer@google.com>
diff --git a/util/fipstools/acvp/entropy_modulewrapper/modulewrapper.cc b/util/fipstools/acvp/entropy_modulewrapper/modulewrapper.cc
index 523db6b..1d6f12f 100644
--- a/util/fipstools/acvp/entropy_modulewrapper/modulewrapper.cc
+++ b/util/fipstools/acvp/entropy_modulewrapper/modulewrapper.cc
@@ -23,7 +23,7 @@
 #include "../modulewrapper/modulewrapper.h"
 
 
-namespace bssl {
+BSSL_NAMESPACE_BEGIN
 namespace acvp {
 
 static bool GetConfig(const Span<const uint8_t> args[],
@@ -42,16 +42,16 @@
         }]
       }
     ])";
-  return write_reply({bssl::StringAsBytes(kConfig)});
+  return write_reply({StringAsBytes(kConfig)});
 }
 
 constexpr size_t DigestLength = 48;
 
 static void HashSHA384(uint8_t *out_digest, Span<const uint8_t> input) {
-  bssl::entropy::SHA512_CTX ctx;
-  bssl::entropy::SHA384_Init(&ctx);
-  bssl::entropy::SHA384_Update(&ctx, input.data(), input.size());
-  bssl::entropy::SHA384_Final(out_digest, &ctx);
+  entropy::SHA512_CTX ctx;
+  entropy::SHA384_Init(&ctx);
+  entropy::SHA384_Update(&ctx, input.data(), input.size());
+  entropy::SHA384_Final(out_digest, &ctx);
 }
 
 static bool SHA384(const Span<const uint8_t> args[],
@@ -93,7 +93,7 @@
 };
 
 Handler FindHandler(Span<const Span<const uint8_t>> args) {
-  auto algorithm = bssl::BytesAsStringView(args[0]);
+  auto algorithm = BytesAsStringView(args[0]);
   for (const auto &func : kFunctions) {
     if (algorithm == func.name) {
       if (args.size() - 1 != func.num_expected_args) {
@@ -112,4 +112,4 @@
 }
 
 }  // namespace acvp
-}  // namespace bssl
+BSSL_NAMESPACE_END
diff --git a/util/fipstools/acvp/modulewrapper/modulewrapper.cc b/util/fipstools/acvp/modulewrapper/modulewrapper.cc
index ffdeae8..80c6297 100644
--- a/util/fipstools/acvp/modulewrapper/modulewrapper.cc
+++ b/util/fipstools/acvp/modulewrapper/modulewrapper.cc
@@ -53,7 +53,7 @@
 #include "modulewrapper.h"
 
 
-namespace bssl {
+BSSL_NAMESPACE_BEGIN
 namespace acvp {
 
 #if defined(OPENSSL_TRUSTY)
@@ -1594,7 +1594,7 @@
   return a.size() == len && memcmp(a.data(), b, len) == 0;
 }
 
-static bssl::UniquePtr<EC_KEY> ECKeyFromName(Span<const uint8_t> name) {
+static UniquePtr<EC_KEY> ECKeyFromName(Span<const uint8_t> name) {
   int nid;
   if (StringEq(name, "P-224")) {
     nid = NID_secp224r1;
@@ -1650,8 +1650,8 @@
                       Span<const uint8_t>(pub_key.second)});
 }
 
-static bssl::UniquePtr<BIGNUM> BytesToBIGNUM(Span<const uint8_t> bytes) {
-  bssl::UniquePtr<BIGNUM> bn(BN_new());
+static UniquePtr<BIGNUM> BytesToBIGNUM(Span<const uint8_t> bytes) {
+  UniquePtr<BIGNUM> bn(BN_new());
   BN_bin2bn(bytes.data(), bytes.size(), bn.get());
   return bn;
 }
@@ -1789,8 +1789,8 @@
   return write_reply({Span<const uint8_t>(&ok, sizeof(ok))});
 }
 
-static std::map<unsigned, bssl::UniquePtr<RSA>> &CachedRSAKeys() {
-  static std::map<unsigned, bssl::UniquePtr<RSA>> keys;
+static std::map<unsigned, UniquePtr<RSA>> &CachedRSAKeys() {
+  static std::map<unsigned, UniquePtr<RSA>> keys;
   return keys;
 }
 
@@ -2540,4 +2540,4 @@
 }
 
 }  // namespace acvp
-}  // namespace bssl
+BSSL_NAMESPACE_END