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

Unified Diff: webrtc/base/sslidentity.cc

Issue 1151943005: Ability to specify KeyType (RSA, ECDSA) for SSLIdentity generation in libjingle (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressing ASAN, LSAN issues in unittests Created 5 years, 6 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
« webrtc/base/sslidentity.h ('K') | « webrtc/base/sslidentity.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/sslidentity.cc
diff --git a/webrtc/base/sslidentity.cc b/webrtc/base/sslidentity.cc
index ea9f547a87d812cac35fac39ad562c15d1103afd..c6a1b6b52351644a13b191260d0641c8a5955995 100644
--- a/webrtc/base/sslidentity.cc
+++ b/webrtc/base/sslidentity.cc
@@ -38,6 +38,12 @@ namespace rtc {
const char kPemTypeCertificate[] = "CERTIFICATE";
const char kPemTypeRsaPrivateKey[] = "RSA PRIVATE KEY";
+static const std::string key_type_names[] { "KT_RSA", "KT_ECDSA" };
+
+std::string KeyTypeToString(KeyType key_type) {
+ return key_type_names[key_type];
+}
+
bool SSLIdentity::PemToDer(const std::string& pem_type,
const std::string& pem_string,
std::string* der) {
« webrtc/base/sslidentity.h ('K') | « webrtc/base/sslidentity.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698