| Index: chrome/common/extensions/api/networking_private/networking_private_crypto_nss.cc
|
| diff --git a/chrome/common/extensions/api/networking_private/networking_private_crypto_nss.cc b/chrome/common/extensions/api/networking_private/networking_private_crypto_nss.cc
|
| index 42c76e0e4aa93ca07dc34be3510fd0ea5b4de418..2cdc33b68a0abca49eef4af2424e79c5e781c830 100644
|
| --- a/chrome/common/extensions/api/networking_private/networking_private_crypto_nss.cc
|
| +++ b/chrome/common/extensions/api/networking_private/networking_private_crypto_nss.cc
|
| @@ -44,11 +44,12 @@ bool GetDERFromPEM(const std::string& pem_data,
|
|
|
| } // namespace
|
|
|
| -bool NetworkingPrivateCrypto::VerifyCredentials(
|
| - const std::string& certificate,
|
| - const std::string& signature,
|
| - const std::string& data,
|
| - const std::string& connected_mac) {
|
| +namespace networking_private_crypto {
|
| +
|
| +bool VerifyCredentials(const std::string& certificate,
|
| + const std::string& signature,
|
| + const std::string& data,
|
| + const std::string& connected_mac) {
|
| crypto::EnsureNSSInit();
|
|
|
| std::vector<uint8_t> cert_data;
|
| @@ -133,10 +134,9 @@ bool NetworkingPrivateCrypto::VerifyCredentials(
|
| return true;
|
| }
|
|
|
| -bool NetworkingPrivateCrypto::EncryptByteString(
|
| - const std::vector<uint8_t>& pub_key_der,
|
| - const std::string& data,
|
| - std::vector<uint8_t>* encrypted_output) {
|
| +bool EncryptByteString(const std::vector<uint8_t>& pub_key_der,
|
| + const std::string& data,
|
| + std::vector<uint8_t>* encrypted_output) {
|
| crypto::EnsureNSSInit();
|
|
|
| SECItem pub_key_der_item;
|
| @@ -175,10 +175,9 @@ bool NetworkingPrivateCrypto::EncryptByteString(
|
| return true;
|
| }
|
|
|
| -bool NetworkingPrivateCrypto::DecryptByteString(
|
| - const std::string& private_key_pem,
|
| - const std::vector<uint8_t>& encrypted_data,
|
| - std::string* decrypted_output) {
|
| +bool DecryptByteString(const std::string& private_key_pem,
|
| + const std::vector<uint8_t>& encrypted_data,
|
| + std::string* decrypted_output) {
|
| crypto::EnsureNSSInit();
|
|
|
| std::vector<uint8_t> private_key_data;
|
| @@ -211,3 +210,5 @@ bool NetworkingPrivateCrypto::DecryptByteString(
|
| output_length);
|
| return true;
|
| }
|
| +
|
| +} // namespace networking_private_crypto
|
|
|