Index: webrtc/base/sslidentity.h |
diff --git a/webrtc/base/sslidentity.h b/webrtc/base/sslidentity.h |
index 320fe53d0f5ad01fee6790c469d7ab0276053c4d..78f846b53e3bc7a304640c3cc892800f1acbf512 100644 |
--- a/webrtc/base/sslidentity.h |
+++ b/webrtc/base/sslidentity.h |
@@ -117,6 +117,8 @@ struct SSLIdentityParams { |
int not_after; // in seconds. |
}; |
+enum KeyType { KT_RSA, KT_ECDSA, KT_DEFAULT = KT_RSA }; |
+ |
// Our identity in an SSL negotiation: a keypair and certificate (both |
// with the same public key). |
// This too is pretty much immutable once created. |
@@ -127,10 +129,12 @@ class SSLIdentity { |
// subject and issuer name, otherwise a random string will be used. |
// Returns NULL on failure. |
// Caller is responsible for freeing the returned object. |
- static SSLIdentity* Generate(const std::string& common_name); |
+ static SSLIdentity* Generate(const std::string& common_name, |
+ KeyType key_type); |
// Generates an identity with the specified validity period. |
- static SSLIdentity* GenerateForTest(const SSLIdentityParams& params); |
+ static SSLIdentity* GenerateForTest(const SSLIdentityParams& params, |
+ KeyType key_type); |
// Construct an identity from a private key and a certificate. |
static SSLIdentity* FromPEMStrings(const std::string& private_key, |