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

Unified Diff: webrtc/base/nssidentity.h

Issue 1189583002: Support generation of EC keys using P256 curve and support ECDSA certs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase, glue to hbos's changes Created 5 years, 4 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 | « talk/session/media/channel_unittest.cc ('k') | webrtc/base/nssidentity.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/nssidentity.h
diff --git a/webrtc/base/nssidentity.h b/webrtc/base/nssidentity.h
index 8a304e9c9f2a2f0bf31502808312c57c534d9b05..9ac76bfb841b665e1e0a7684250698baa9946870 100644
--- a/webrtc/base/nssidentity.h
+++ b/webrtc/base/nssidentity.h
@@ -24,6 +24,12 @@
#include "hasht.h"
#include "keythi.h"
+#ifdef NSS_SSL_RELATIVE_PATH
+#include "ssl.h"
+#else
+#include "net/third_party/nss/ssl/ssl.h"
+#endif
+
#include "webrtc/base/common.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/scoped_ptr.h"
@@ -33,18 +39,24 @@ namespace rtc {
class NSSKeyPair {
public:
- NSSKeyPair(SECKEYPrivateKey* privkey, SECKEYPublicKey* pubkey) :
- privkey_(privkey), pubkey_(pubkey) {}
+ NSSKeyPair(SECKEYPrivateKey* privkey, SECKEYPublicKey* pubkey)
+ : privkey_(privkey), pubkey_(pubkey), ssl_kea_type_(ssl_kea_null) {}
+ NSSKeyPair(SECKEYPrivateKey* privkey,
+ SECKEYPublicKey* pubkey,
+ SSLKEAType ssl_kea_type)
+ : privkey_(privkey), pubkey_(pubkey), ssl_kea_type_(ssl_kea_type) {}
~NSSKeyPair();
// Generate a 1024-bit RSA key pair.
- static NSSKeyPair* Generate();
+ static NSSKeyPair* Generate(KeyType key_type);
NSSKeyPair* GetReference();
SECKEYPrivateKey* privkey() const { return privkey_; }
SECKEYPublicKey * pubkey() const { return pubkey_; }
+ SSLKEAType ssl_kea_type() const { return ssl_kea_type_; }
private:
+ SSLKEAType ssl_kea_type_;
SECKEYPrivateKey* privkey_;
SECKEYPublicKey* pubkey_;
@@ -103,7 +115,8 @@ class NSSCertificate : public SSLCertificate {
// Represents a SSL key pair and certificate for NSS.
class NSSIdentity : public SSLIdentity {
public:
- static NSSIdentity* Generate(const std::string& common_name);
+ static NSSIdentity* Generate(const std::string& common_name,
+ KeyType key_type);
static NSSIdentity* GenerateForTest(const SSLIdentityParams& params);
static SSLIdentity* FromPEMStrings(const std::string& private_key,
const std::string& certificate);
« no previous file with comments | « talk/session/media/channel_unittest.cc ('k') | webrtc/base/nssidentity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698