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

Unified Diff: net/ssl/ssl_platform_key_util_unittest.cc

Issue 2822283002: Remove SSLPrivateKey metadata hooks. (Closed)
Patch Set: emaxx comment Created 3 years, 8 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
« no previous file with comments | « net/ssl/ssl_platform_key_util.cc ('k') | net/ssl/ssl_platform_key_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_platform_key_util_unittest.cc
diff --git a/net/ssl/ssl_platform_key_util_unittest.cc b/net/ssl/ssl_platform_key_util_unittest.cc
index 8a00034fecb391e0494ceb3db974fce598e713fe..e8c2a02aa56e7c1c0b47ee9f752ad7bd4d03d08c 100644
--- a/net/ssl/ssl_platform_key_util_unittest.cc
+++ b/net/ssl/ssl_platform_key_util_unittest.cc
@@ -13,13 +13,14 @@
#include "net/test/test_data_directory.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/boringssl/src/include/openssl/ecdsa.h"
+#include "third_party/boringssl/src/include/openssl/evp.h"
namespace net {
namespace {
bool GetClientCertInfoFromFile(const char* filename,
- SSLPrivateKey::Type* out_type,
+ int* out_type,
size_t* out_max_length) {
scoped_refptr<X509Certificate> cert =
ImportCertFromFile(GetTestCertsDirectory(), filename);
@@ -38,23 +39,23 @@ size_t BitsToBytes(size_t bits) {
} // namespace
TEST(SSLPlatformKeyUtil, GetClientCertInfo) {
- SSLPrivateKey::Type type;
+ int type;
size_t max_length;
ASSERT_TRUE(GetClientCertInfoFromFile("client_1.pem", &type, &max_length));
- EXPECT_EQ(SSLPrivateKey::Type::RSA, type);
+ EXPECT_EQ(EVP_PKEY_RSA, type);
EXPECT_EQ(2048u / 8u, max_length);
ASSERT_TRUE(GetClientCertInfoFromFile("client_4.pem", &type, &max_length));
- EXPECT_EQ(SSLPrivateKey::Type::ECDSA_P256, type);
+ EXPECT_EQ(EVP_PKEY_EC, type);
EXPECT_EQ(ECDSA_SIG_max_len(BitsToBytes(256)), max_length);
ASSERT_TRUE(GetClientCertInfoFromFile("client_5.pem", &type, &max_length));
- EXPECT_EQ(SSLPrivateKey::Type::ECDSA_P384, type);
+ EXPECT_EQ(EVP_PKEY_EC, type);
EXPECT_EQ(ECDSA_SIG_max_len(BitsToBytes(384)), max_length);
ASSERT_TRUE(GetClientCertInfoFromFile("client_6.pem", &type, &max_length));
- EXPECT_EQ(SSLPrivateKey::Type::ECDSA_P521, type);
+ EXPECT_EQ(EVP_PKEY_EC, type);
EXPECT_EQ(ECDSA_SIG_max_len(BitsToBytes(521)), max_length);
}
« no previous file with comments | « net/ssl/ssl_platform_key_util.cc ('k') | net/ssl/ssl_platform_key_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698