diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/BUILD.gn | 48 | ||||
-rw-r--r-- | crypto/hkdf.h | 1 | ||||
-rw-r--r-- | crypto/mac_security_services_lock.h | 2 | ||||
-rw-r--r-- | crypto/nss_util_chromeos.cc | 4 | ||||
-rw-r--r-- | crypto/p224_spake.cc | 4 |
5 files changed, 28 insertions, 31 deletions
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn index f36aa4315..37b86585e 100644 --- a/crypto/BUILD.gn +++ b/crypto/BUILD.gn @@ -68,32 +68,12 @@ component("crypto") { ] if (is_apple) { - sources += [ - "apple_keychain.h", - - # TODO(brettw): these mocks should be moved to a test_support_crypto - # target if possible. - "mock_apple_keychain.cc", - "mock_apple_keychain.h", - ] + sources += [ "apple_keychain.h" ] if (is_mac) { - sources += [ - "apple_keychain_mac.cc", - - # TODO(brettw): these mocks should be moved to a test_support_crypto - # target if possible. - "mock_apple_keychain_mac.cc", - ] - } - if (is_ios) { - sources += [ - "apple_keychain_ios.mm", - - # TODO(brettw): these mocks should be moved to a test_support_crypto - # target if possible. - "mock_apple_keychain_ios.cc", - ] + sources += [ "apple_keychain_mac.cc" ] + } else if (is_ios) { + sources += [ "apple_keychain_ios.mm" ] } frameworks = [ @@ -148,6 +128,26 @@ component("crypto") { defines = [ "CRYPTO_IMPLEMENTATION" ] } +if (is_apple) { + source_set("mock_apple_keychain") { + sources = [ + "mock_apple_keychain.cc", + "mock_apple_keychain.h", + ] + + if (is_mac) { + sources += [ "mock_apple_keychain_mac.cc" ] + } else if (is_ios) { + sources += [ "mock_apple_keychain_ios.cc" ] + } + + deps = [ + ":crypto", + "//base", + ] + } +} + test("crypto_unittests") { sources = [ "aead_unittest.cc", diff --git a/crypto/hkdf.h b/crypto/hkdf.h index c9aeabe2b..8fef8c6d2 100644 --- a/crypto/hkdf.h +++ b/crypto/hkdf.h @@ -9,6 +9,7 @@ #include <string> #include <string_view> +#include <vector> #include "base/containers/span.h" #include "crypto/crypto_export.h" diff --git a/crypto/mac_security_services_lock.h b/crypto/mac_security_services_lock.h index da4e49038..08750d15f 100644 --- a/crypto/mac_security_services_lock.h +++ b/crypto/mac_security_services_lock.h @@ -17,7 +17,7 @@ namespace crypto { // thread-safe. In particular, code that accesses the CSSM database is // problematic. // -// http://developer.apple.com/mac/library/documentation/Security/Reference/certifkeytrustservices/Reference/reference.html +// https://developer.apple.com/documentation/security/certificate_key_and_trust_services/working_with_concurrency CRYPTO_EXPORT base::Lock& GetMacSecurityServicesLock(); } // namespace crypto diff --git a/crypto/nss_util_chromeos.cc b/crypto/nss_util_chromeos.cc index b2a320552..152c87fa6 100644 --- a/crypto/nss_util_chromeos.cc +++ b/crypto/nss_util_chromeos.cc @@ -149,7 +149,7 @@ class ChromeOSTokenManager { explicit TPMModuleAndSlot(SECMODModule* init_chaps_module) : chaps_module(init_chaps_module) {} - raw_ptr<SECMODModule, ExperimentalAsh> chaps_module; + raw_ptr<SECMODModule> chaps_module; ScopedPK11Slot tpm_slot; }; @@ -488,7 +488,7 @@ class ChromeOSTokenManager { std::unique_ptr<base::OnceClosureList> tpm_ready_callback_list_ = std::make_unique<base::OnceClosureList>(); - raw_ptr<SECMODModule, ExperimentalAsh> chaps_module_ = nullptr; + raw_ptr<SECMODModule> chaps_module_ = nullptr; ScopedPK11Slot system_slot_; std::map<std::string, std::unique_ptr<ChromeOSUserData>> chromeos_user_map_; ScopedPK11Slot prepared_test_private_slot_; diff --git a/crypto/p224_spake.cc b/crypto/p224_spake.cc index b77da9cde..8785c7061 100644 --- a/crypto/p224_spake.cc +++ b/crypto/p224_spake.cc @@ -220,8 +220,6 @@ const std::string& P224EncryptedKeyExchange::GetNextMessage() { LOG(FATAL) << "P224EncryptedKeyExchange::GetNextMessage called in" " bad state " << state_; - next_message_ = ""; - return next_message_; } P224EncryptedKeyExchange::Result P224EncryptedKeyExchange::ProcessMessage( @@ -245,8 +243,6 @@ P224EncryptedKeyExchange::Result P224EncryptedKeyExchange::ProcessMessage( if (state_ != kStateRecvDH) { LOG(FATAL) << "P224EncryptedKeyExchange::ProcessMessage called in" " bad state " << state_; - error_ = "internal error"; - return kResultFailed; } const EC_GROUP* p224 = EC_group_p224(); |