Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5114)

Unified Diff: chrome/common/extensions/api/networking_private/networking_private_crypto.h

Issue 396463004: Implement NetworkingPrivateCrypto for OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase across gyp/gn changes. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/networking_private/networking_private_crypto.h
diff --git a/chrome/common/extensions/api/networking_private/networking_private_crypto.h b/chrome/common/extensions/api/networking_private/networking_private_crypto.h
index 5e1eb3fd30bc4a1839fc03b5dc2fcd6a79072489..ffdb99739609661ce5af74c286fb3cf32ab07f0f 100644
--- a/chrome/common/extensions/api/networking_private/networking_private_crypto.h
+++ b/chrome/common/extensions/api/networking_private/networking_private_crypto.h
@@ -5,8 +5,11 @@
#ifndef CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CRYPTO_H_
#define CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CRYPTO_H_
+#include <stdint.h>
+
#include <string>
#include <vector>
+
#include "base/basictypes.h"
// Implementation of Crypto support for networking private API.
@@ -34,9 +37,9 @@ class NetworkingPrivateCrypto {
//
// Returns true on success, storing the encrypted result in
// |encrypted_output|.
- bool EncryptByteString(const std::vector<uint8>& public_key,
+ bool EncryptByteString(const std::vector<uint8_t>& public_key,
const std::string& data,
- std::vector<uint8>* encrypted_output);
+ std::vector<uint8_t>* encrypted_output);
private:
friend class NetworkingPrivateCryptoTest;
@@ -48,9 +51,16 @@ class NetworkingPrivateCrypto {
// Returns true on success, storing the decrypted result in
// |decrypted_output|.
bool DecryptByteString(const std::string& private_key_pem,
- const std::vector<uint8>& encrypted_data,
+ const std::vector<uint8_t>& encrypted_data,
std::string* decrypted_output);
+ // The trusted public key as a DER-encoded PKCS#1 RSAPublicKey
+ // structure.
+ static const uint8_t kTrustedCAPublicKeyDER[];
+
+ // The length of |kTrustedCAPublicKeyDER| in bytes.
+ static const size_t kTrustedCAPublicKeyDERLength;
+
DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCrypto);
};
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/extensions/api/networking_private/networking_private_crypto.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698