summaryrefslogtreecommitdiff
path: root/chromium/crypto
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-20 15:06:40 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-11-22 11:48:58 +0000
commitdaa093eea7c773db06799a13bd7e4e2e2a9f8f14 (patch)
tree96cc5e7b9194c1b29eab927730bfa419e7111c25 /chromium/crypto
parentbe59a35641616a4cf23c4a13fa0632624b021c1b (diff)
downloadqtwebengine-chromium-daa093eea7c773db06799a13bd7e4e2e2a9f8f14.tar.gz
BASELINE: Update Chromium to 63.0.3239.58
Change-Id: Ia93b322a00ba4dd4004f3bcf1254063ba90e1605 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/crypto')
-rw-r--r--chromium/crypto/ec_private_key.cc5
-rw-r--r--chromium/crypto/ec_private_key.h3
-rw-r--r--chromium/crypto/ec_private_key_unittest.cc58
-rw-r--r--chromium/crypto/nss_util.cc1
-rw-r--r--chromium/crypto/openssl_util.cc6
-rw-r--r--chromium/crypto/openssl_util.h7
6 files changed, 13 insertions, 67 deletions
diff --git a/chromium/crypto/ec_private_key.cc b/chromium/crypto/ec_private_key.cc
index 75b86c0c057..4297716f6ec 100644
--- a/chromium/crypto/ec_private_key.cc
+++ b/chromium/crypto/ec_private_key.cc
@@ -59,10 +59,7 @@ std::unique_ptr<ECPrivateKey> ECPrivateKey::CreateFromPrivateKeyInfo(
// static
std::unique_ptr<ECPrivateKey> ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
- const std::vector<uint8_t>& encrypted_private_key_info,
- const std::vector<uint8_t>& subject_public_key_info) {
- // TODO(davidben): The |subject_public_key_info| parameter is a remnant of
- // the NSS implementation. Remove it.
+ const std::vector<uint8_t>& encrypted_private_key_info) {
OpenSSLErrStackTracer err_tracer(FROM_HERE);
CBS cbs;
diff --git a/chromium/crypto/ec_private_key.h b/chromium/crypto/ec_private_key.h
index 432019be5d7..c087d238f9d 100644
--- a/chromium/crypto/ec_private_key.h
+++ b/chromium/crypto/ec_private_key.h
@@ -47,8 +47,7 @@ class CRYPTO_EXPORT ECPrivateKey {
// This function is deprecated. Use CreateFromPrivateKeyInfo for new code.
// See https://crbug.com/603319.
static std::unique_ptr<ECPrivateKey> CreateFromEncryptedPrivateKeyInfo(
- const std::vector<uint8_t>& encrypted_private_key_info,
- const std::vector<uint8_t>& subject_public_key_info);
+ const std::vector<uint8_t>& encrypted_private_key_info);
// Returns a copy of the object.
std::unique_ptr<ECPrivateKey> Copy() const;
diff --git a/chromium/crypto/ec_private_key_unittest.cc b/chromium/crypto/ec_private_key_unittest.cc
index 534564703df..00aa8a8d218 100644
--- a/chromium/crypto/ec_private_key_unittest.cc
+++ b/chromium/crypto/ec_private_key_unittest.cc
@@ -54,11 +54,9 @@ TEST(ECPrivateKeyUnitTest, InitRandomTest) {
// Re-import as an EncryptedPrivateKeyInfo with kPassword1.
std::vector<uint8_t> encrypted_privkey;
- std::vector<uint8_t> pubkey;
EXPECT_TRUE(keypair->ExportEncryptedPrivateKey(&encrypted_privkey));
- EXPECT_TRUE(keypair->ExportPublicKey(&pubkey));
keypair_copy = crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
- encrypted_privkey, pubkey);
+ encrypted_privkey);
ASSERT_TRUE(keypair_copy);
ExpectKeysEqual(keypair.get(), keypair_copy.get());
}
@@ -207,22 +205,10 @@ TEST(ECPrivateKeyUnitTest, LoadNSSKeyTest) {
0x9f, 0x41, 0x83, 0x72, 0xf2, 0x0a, 0xe9, 0xe1, 0x2c, 0x12, 0xb0, 0xb0,
0x0a, 0xb2, 0x1d, 0xca, 0x15, 0xb2, 0xca,
};
- static const uint8_t kNSSPublicKey[] = {
- 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02,
- 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03,
- 0x42, 0x00, 0x04, 0x85, 0x92, 0x9e, 0x95, 0x5c, 0x6b, 0x9e, 0xd6, 0x1e,
- 0xb8, 0x64, 0xea, 0xc2, 0xb3, 0xef, 0x18, 0xed, 0x3a, 0x5e, 0xc4, 0x5c,
- 0x15, 0x37, 0x6a, 0xe9, 0xaa, 0x0b, 0x34, 0x03, 0xfd, 0xca, 0x83, 0x0f,
- 0xd7, 0x5c, 0x5d, 0xc5, 0x53, 0x6e, 0xe5, 0xa9, 0x33, 0xd5, 0xcc, 0xab,
- 0x53, 0x78, 0xdd, 0xd6, 0x12, 0x3a, 0x5e, 0xeb, 0xbf, 0xdf, 0x16, 0xd3,
- 0x2c, 0x3b, 0xe8, 0xdb, 0x19, 0xfc, 0x5e,
- };
std::unique_ptr<crypto::ECPrivateKey> keypair_nss(
crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
- std::vector<uint8_t>(std::begin(kNSSKey), std::end(kNSSKey)),
- std::vector<uint8_t>(std::begin(kNSSPublicKey),
- std::end(kNSSPublicKey))));
+ std::vector<uint8_t>(std::begin(kNSSKey), std::end(kNSSKey))));
EXPECT_TRUE(keypair_nss);
}
@@ -266,9 +252,8 @@ TEST(ECPrivateKeyUnitTest, LoadOpenSSLKeyTest) {
std::unique_ptr<crypto::ECPrivateKey> keypair_openssl(
crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
- std::vector<uint8_t>(std::begin(kOpenSSLKey), std::end(kOpenSSLKey)),
- std::vector<uint8_t>(std::begin(kOpenSSLPublicKey),
- std::end(kOpenSSLPublicKey))));
+ std::vector<uint8_t>(std::begin(kOpenSSLKey),
+ std::end(kOpenSSLKey))));
EXPECT_TRUE(keypair_openssl);
@@ -327,42 +312,11 @@ TEST(ECPrivateKeyUnitTest, LoadOldOpenSSLKeyTest) {
0x35, 0xc5, 0xe3, 0xc5, 0xaa, 0x15, 0x3c, 0xac, 0x30, 0xbc, 0x45, 0x16,
0xed,
};
- static const uint8_t kOpenSSLPublicKey[] = {
- 0x30, 0x82, 0x01, 0x4b, 0x30, 0x82, 0x01, 0x03, 0x06, 0x07, 0x2a, 0x86,
- 0x48, 0xce, 0x3d, 0x02, 0x01, 0x30, 0x81, 0xf7, 0x02, 0x01, 0x01, 0x30,
- 0x2c, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x01, 0x01, 0x02, 0x21,
- 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x30, 0x5b, 0x04,
- 0x20, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x04, 0x20, 0x5a,
- 0xc6, 0x35, 0xd8, 0xaa, 0x3a, 0x93, 0xe7, 0xb3, 0xeb, 0xbd, 0x55, 0x76,
- 0x98, 0x86, 0xbc, 0x65, 0x1d, 0x06, 0xb0, 0xcc, 0x53, 0xb0, 0xf6, 0x3b,
- 0xce, 0x3c, 0x3e, 0x27, 0xd2, 0x60, 0x4b, 0x03, 0x15, 0x00, 0xc4, 0x9d,
- 0x36, 0x08, 0x86, 0xe7, 0x04, 0x93, 0x6a, 0x66, 0x78, 0xe1, 0x13, 0x9d,
- 0x26, 0xb7, 0x81, 0x9f, 0x7e, 0x90, 0x04, 0x41, 0x04, 0x6b, 0x17, 0xd1,
- 0xf2, 0xe1, 0x2c, 0x42, 0x47, 0xf8, 0xbc, 0xe6, 0xe5, 0x63, 0xa4, 0x40,
- 0xf2, 0x77, 0x03, 0x7d, 0x81, 0x2d, 0xeb, 0x33, 0xa0, 0xf4, 0xa1, 0x39,
- 0x45, 0xd8, 0x98, 0xc2, 0x96, 0x4f, 0xe3, 0x42, 0xe2, 0xfe, 0x1a, 0x7f,
- 0x9b, 0x8e, 0xe7, 0xeb, 0x4a, 0x7c, 0x0f, 0x9e, 0x16, 0x2b, 0xce, 0x33,
- 0x57, 0x6b, 0x31, 0x5e, 0xce, 0xcb, 0xb6, 0x40, 0x68, 0x37, 0xbf, 0x51,
- 0xf5, 0x02, 0x21, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbc, 0xe6, 0xfa, 0xad,
- 0xa7, 0x17, 0x9e, 0x84, 0xf3, 0xb9, 0xca, 0xc2, 0xfc, 0x63, 0x25, 0x51,
- 0x02, 0x01, 0x01, 0x03, 0x42, 0x00, 0x04, 0xde, 0x09, 0x08, 0x07, 0x03,
- 0x2e, 0x8f, 0x37, 0x9a, 0xd5, 0xad, 0xe5, 0xc6, 0x9d, 0xd4, 0x63, 0xc7,
- 0x4a, 0xe7, 0x20, 0xcb, 0x90, 0xa0, 0x1f, 0x18, 0x18, 0x72, 0xb5, 0x21,
- 0x88, 0x38, 0xc0, 0xdb, 0xba, 0xf6, 0x99, 0xd8, 0xa5, 0x3b, 0x83, 0xe9,
- 0xe3, 0xd5, 0x61, 0x99, 0x73, 0x42, 0xc6, 0x6c, 0xe8, 0x0a, 0x95, 0x40,
- 0x41, 0x3b, 0x0d, 0x10, 0xa7, 0x4a, 0x93, 0xdb, 0x5a, 0xe7, 0xec,
- };
std::unique_ptr<crypto::ECPrivateKey> keypair_openssl(
crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
- std::vector<uint8_t>(std::begin(kOpenSSLKey), std::end(kOpenSSLKey)),
- std::vector<uint8_t>(std::begin(kOpenSSLPublicKey),
- std::end(kOpenSSLPublicKey))));
+ std::vector<uint8_t>(std::begin(kOpenSSLKey),
+ std::end(kOpenSSLKey))));
EXPECT_TRUE(keypair_openssl);
}
diff --git a/chromium/crypto/nss_util.cc b/chromium/crypto/nss_util.cc
index a0e7f61fab0..e5a6d6f68f5 100644
--- a/chromium/crypto/nss_util.cc
+++ b/chromium/crypto/nss_util.cc
@@ -34,7 +34,6 @@
#include "base/threading/thread_checker.h"
#include "base/threading/thread_restrictions.h"
#include "base/threading/thread_task_runner_handle.h"
-#include "base/threading/worker_pool.h"
#include "build/build_config.h"
#include "crypto/nss_crypto_module_delegate.h"
#include "crypto/nss_util_internal.h"
diff --git a/chromium/crypto/openssl_util.cc b/chromium/crypto/openssl_util.cc
index 65be615a505..71b26eacb5c 100644
--- a/chromium/crypto/openssl_util.cc
+++ b/chromium/crypto/openssl_util.cc
@@ -39,15 +39,13 @@ void EnsureOpenSSLInit() {
CRYPTO_library_init();
}
-void ClearOpenSSLERRStack(const tracked_objects::Location& location) {
+void ClearOpenSSLERRStack(const base::Location& location) {
if (DCHECK_IS_ON() && VLOG_IS_ON(1)) {
uint32_t error_num = ERR_peek_error();
if (error_num == 0)
return;
- std::string message;
- location.Write(true, true, &message);
- DVLOG(1) << "OpenSSL ERR_get_error stack from " << message;
+ DVLOG(1) << "OpenSSL ERR_get_error stack from " << location.ToString();
ERR_print_errors_cb(&OpenSSLErrorCallback, NULL);
} else {
ERR_clear_error();
diff --git a/chromium/crypto/openssl_util.h b/chromium/crypto/openssl_util.h
index 54f06d337f8..56ee54d2371 100644
--- a/chromium/crypto/openssl_util.h
+++ b/chromium/crypto/openssl_util.h
@@ -63,8 +63,7 @@ CRYPTO_EXPORT void EnsureOpenSSLInit();
// Drains the OpenSSL ERR_get_error stack. On a debug build the error codes
// are send to VLOG(1), on a release build they are disregarded. In most
// cases you should pass FROM_HERE as the |location|.
-CRYPTO_EXPORT void ClearOpenSSLERRStack(
- const tracked_objects::Location& location);
+CRYPTO_EXPORT void ClearOpenSSLERRStack(const base::Location& location);
// Place an instance of this class on the call stack to automatically clear
// the OpenSSL error stack on function exit.
@@ -73,7 +72,7 @@ class OpenSSLErrStackTracer {
// Pass FROM_HERE as |location|, to help track the source of OpenSSL error
// messages. Note any diagnostic emitted will be tagged with the location of
// the constructor call as it's not possible to trace a destructor's callsite.
- explicit OpenSSLErrStackTracer(const tracked_objects::Location& location)
+ explicit OpenSSLErrStackTracer(const base::Location& location)
: location_(location) {
EnsureOpenSSLInit();
}
@@ -82,7 +81,7 @@ class OpenSSLErrStackTracer {
}
private:
- const tracked_objects::Location location_;
+ const base::Location location_;
DISALLOW_IMPLICIT_CONSTRUCTORS(OpenSSLErrStackTracer);
};