From f1a1a7510bfb1e3d0fefc9aa58041d3ebc616a25 Mon Sep 17 00:00:00 2001 From: Hai Shang Date: Tue, 18 Apr 2023 19:20:34 -0700 Subject: [PATCH] fix include paths PiperOrigin-RevId: 525315412 --- internal/crypto/aead.cc | 2 +- internal/crypto/ec_private_key.cc | 2 +- internal/crypto/encryptor.cc | 2 +- internal/crypto/hmac.cc | 2 +- internal/crypto/nearby_base.cc | 2 +- internal/crypto/openssl_util.cc | 22 +++------------------- internal/crypto/signature_verifier.cc | 2 +- internal/crypto/symmetric_key.cc | 2 +- 8 files changed, 10 insertions(+), 26 deletions(-) diff --git a/internal/crypto/aead.cc b/internal/crypto/aead.cc index 41bedf2a..bbba65ce 100644 --- a/internal/crypto/aead.cc +++ b/internal/crypto/aead.cc @@ -22,7 +22,7 @@ #include #ifdef NEARBY_CHROMIUM -#include "base/check.h" +#include "internal/platform/logging.h" #elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else diff --git a/internal/crypto/ec_private_key.cc b/internal/crypto/ec_private_key.cc index 1281a70d..63471e02 100644 --- a/internal/crypto/ec_private_key.cc +++ b/internal/crypto/ec_private_key.cc @@ -24,7 +24,7 @@ #include #ifdef NEARBY_CHROMIUM -#include "base/check.h" +#include "internal/platform/logging.h" #elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else diff --git a/internal/crypto/encryptor.cc b/internal/crypto/encryptor.cc index dbb40cda..bc078ab2 100644 --- a/internal/crypto/encryptor.cc +++ b/internal/crypto/encryptor.cc @@ -23,7 +23,7 @@ #include #ifdef NEARBY_CHROMIUM -#include "base/check.h" +#include "internal/platform/logging.h" #elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else diff --git a/internal/crypto/hmac.cc b/internal/crypto/hmac.cc index e75c7f71..d9dfd8c6 100644 --- a/internal/crypto/hmac.cc +++ b/internal/crypto/hmac.cc @@ -20,7 +20,7 @@ #include #ifdef NEARBY_CHROMIUM -#include "base/check.h" +#include "internal/platform/logging.h" #elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else diff --git a/internal/crypto/nearby_base.cc b/internal/crypto/nearby_base.cc index 47292e24..1547ebaa 100644 --- a/internal/crypto/nearby_base.cc +++ b/internal/crypto/nearby_base.cc @@ -19,7 +19,7 @@ #include #ifdef NEARBY_CHROMIUM -#include "base/check.h" +#include "internal/platform/logging.h" #elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else diff --git a/internal/crypto/openssl_util.cc b/internal/crypto/openssl_util.cc index 98dd3b50..acac591d 100644 --- a/internal/crypto/openssl_util.cc +++ b/internal/crypto/openssl_util.cc @@ -19,7 +19,9 @@ #include -#ifdef NEARBY_SWIFTPM +#ifdef NEARBY_CHROMIUM +#include "internal/platform/logging.h" +#elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else #include "absl/log/log.h" // nogncheck @@ -30,24 +32,6 @@ namespace crypto { -namespace { - -// Callback routine for OpenSSL to print error messages. |str| is a -// NULL-terminated string of length |len| containing diagnostic information -// such as the library, function and reason for the error, the file and line -// where the error originated, plus potentially any context-specific -// information about the error. |context| contains a pointer to user-supplied -// data, which is currently unused. -// If this callback returns a value <= 0, OpenSSL will stop processing the -// error queue and return, otherwise it will continue calling this function -// until all errors have been removed from the queue. -int OpenSSLErrorCallback(const char* str, size_t len, void* context) { - LOG(INFO) << "\t" << absl::string_view(str, len); - return 1; -} - -} // namespace - void EnsureOpenSSLInit() { // CRYPTO_library_init may be safely called concurrently. CRYPTO_library_init(); diff --git a/internal/crypto/signature_verifier.cc b/internal/crypto/signature_verifier.cc index 363b0f60..8157a384 100644 --- a/internal/crypto/signature_verifier.cc +++ b/internal/crypto/signature_verifier.cc @@ -17,7 +17,7 @@ #include #ifdef NEARBY_CHROMIUM -#include "base/check.h" +#include "internal/platform/logging.h" #elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else diff --git a/internal/crypto/symmetric_key.cc b/internal/crypto/symmetric_key.cc index 7cdebcd6..a3beddfd 100644 --- a/internal/crypto/symmetric_key.cc +++ b/internal/crypto/symmetric_key.cc @@ -23,7 +23,7 @@ #include #ifdef NEARBY_CHROMIUM -#include "base/check.h" +#include "internal/platform/logging.h" #elif defined(NEARBY_SWIFTPM) #include "internal/platform/logging.h" #else