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

Unified Diff: net/ssl/ssl_private_key.h

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_win.cc ('k') | net/ssl/ssl_private_key_test_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ssl/ssl_private_key.h
diff --git a/net/ssl/ssl_private_key.h b/net/ssl/ssl_private_key.h
index 145cd5037c6555577c723c6f2bbba19590d5ba23..0c877a5feb61224ded4cb044b209d74a7b95c409 100644
--- a/net/ssl/ssl_private_key.h
+++ b/net/ssl/ssl_private_key.h
@@ -23,19 +23,6 @@ class SSLPrivateKey : public base::RefCountedThreadSafe<SSLPrivateKey> {
public:
using SignCallback = base::Callback<void(Error, const std::vector<uint8_t>&)>;
- enum class Type {
- RSA,
- ECDSA_P256,
- ECDSA_P384,
- ECDSA_P521,
- };
-
- // Returns true if |type| is an ECDSA key type.
- static bool IsECDSAType(Type type) {
- return type == Type::ECDSA_P256 || type == Type::ECDSA_P384 ||
- type == Type::ECDSA_P521;
- }
-
enum class Hash {
MD5_SHA1,
SHA1,
@@ -46,21 +33,9 @@ class SSLPrivateKey : public base::RefCountedThreadSafe<SSLPrivateKey> {
SSLPrivateKey() {}
- // Returns whether the key is an RSA key or an ECDSA key. Although the signing
- // interface is type-agnositic and type tags in interfaces are discouraged,
- // TLS has key-specific logic in selecting which hashes to sign. Exposing the
- // key type avoids replicating BoringSSL's TLS-specific logic in SSLPrivateKey
- // implementations and complicating the interface between Chromium and
- // BoringSSL.
- virtual Type GetType() = 0;
-
// Returns the digests that are supported by the key in decreasing preference.
virtual std::vector<SSLPrivateKey::Hash> GetDigestPreferences() = 0;
- // Returns the maximum size of a signature, in bytes. For an RSA key, this
- // must be the size of the modulus.
- virtual size_t GetMaxSignatureLengthInBytes() = 0;
-
// Asynchronously signs an |input| which was computed with the hash |hash|. On
// completion, it calls |callback| with the signature or an error code if the
// operation failed. For an RSA key, the signature is a PKCS#1 signature. The
« no previous file with comments | « net/ssl/ssl_platform_key_win.cc ('k') | net/ssl/ssl_private_key_test_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698