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

Unified Diff: net/socket/ssl_client_socket_impl.cc

Issue 2391213002: Report curve types in ECDSA SSLPrivateKeys. (Closed)
Patch Set: rebase Created 4 years, 2 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/net.gypi ('k') | net/ssl/ssl_platform_key_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_impl.cc
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc
index 177a1ba91800162b14c2653fe60dcd04f9eea5d2..cc3f04a06022a345e28988f0c20c32f4c2b06358 100644
--- a/net/socket/ssl_client_socket_impl.cc
+++ b/net/socket/ssl_client_socket_impl.cc
@@ -112,8 +112,14 @@ std::unique_ptr<base::Value> NetLogPrivateKeyOperationCallback(
case SSLPrivateKey::Type::RSA:
type_str = "RSA";
break;
- case SSLPrivateKey::Type::ECDSA:
- type_str = "ECDSA";
+ case SSLPrivateKey::Type::ECDSA_P256:
+ type_str = "ECDSA_P256";
+ break;
+ case SSLPrivateKey::Type::ECDSA_P384:
+ type_str = "ECDSA_P384";
+ break;
+ case SSLPrivateKey::Type::ECDSA_P521:
+ type_str = "ECDSA_P521";
break;
}
@@ -2050,12 +2056,16 @@ bool SSLClientSocketImpl::IsRenegotiationAllowed() const {
int SSLClientSocketImpl::PrivateKeyTypeCallback() {
switch (ssl_config_.client_private_key->GetType()) {
case SSLPrivateKey::Type::RSA:
- return EVP_PKEY_RSA;
- case SSLPrivateKey::Type::ECDSA:
- return EVP_PKEY_EC;
+ return NID_rsaEncryption;
+ case SSLPrivateKey::Type::ECDSA_P256:
+ return NID_X9_62_prime256v1;
+ case SSLPrivateKey::Type::ECDSA_P384:
+ return NID_secp384r1;
+ case SSLPrivateKey::Type::ECDSA_P521:
+ return NID_secp521r1;
}
NOTREACHED();
- return EVP_PKEY_NONE;
+ return NID_undef;
}
size_t SSLClientSocketImpl::PrivateKeyMaxSignatureLenCallback() {
« no previous file with comments | « net/net.gypi ('k') | net/ssl/ssl_platform_key_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698