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

Unified Diff: webrtc/base/nssidentity.cc

Issue 1329493005: Provide RSA2048 as per RFC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 | « no previous file | webrtc/base/nssstreamadapter.cc » ('j') | webrtc/base/nssstreamadapter.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/nssidentity.cc
diff --git a/webrtc/base/nssidentity.cc b/webrtc/base/nssidentity.cc
index 6511942a3443eab85f977d24c2a868d7df4f30f7..f32c6c0f2f67f5129dceb901c4aaa9d6e901d635 100644
--- a/webrtc/base/nssidentity.cc
+++ b/webrtc/base/nssidentity.cc
@@ -52,9 +52,9 @@ NSSKeyPair* NSSKeyPair::Generate(KeyType key_type) {
SECKEYPrivateKey* privkey = nullptr;
SECKEYPublicKey* pubkey = nullptr;
SSLKEAType ssl_kea_type;
- if (key_type == KT_RSA) {
+ if (key_type == KT_RSA1024 || key_type == KT_RSA2048) {
PK11RSAGenParams rsa_params;
- rsa_params.keySizeInBits = 1024;
+ rsa_params.keySizeInBits = key_type == KT_RSA1024 ? 1024 : 2048;
rsa_params.pe = 0x010001; // 65537 -- a common RSA public exponent.
privkey = PK11_GenerateKeyPair(
@@ -432,7 +432,7 @@ NSSIdentity* NSSIdentity::GenerateInternal(const SSLIdentityParams& params) {
arena = certificate->arena;
SECOidTag sec_oid;
- if (params.key_type == KT_RSA) {
+ if (params.key_type == KT_RSA1024 || params.key_type == KT_RSA2048) {
sec_oid = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION;
} else if (params.key_type == KT_ECDSA) {
sec_oid = SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE;
« no previous file with comments | « no previous file | webrtc/base/nssstreamadapter.cc » ('j') | webrtc/base/nssstreamadapter.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698