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

Side by Side Diff: talk/app/webrtc/java/jni/peerconnection_jni.cc

Issue 1329493005: Provide RSA2048 as per RFC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Allow full parameterization of RSA, curve id for ECDSA. Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config.servers); 1420 JavaIceServersToJsepIceServers(jni, j_ice_servers, &rtc_config.servers);
1421 rtc_config.audio_jitter_buffer_max_packets = 1421 rtc_config.audio_jitter_buffer_max_packets =
1422 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id); 1422 GetIntField(jni, j_rtc_config, j_audio_jitter_buffer_max_packets_id);
1423 rtc_config.audio_jitter_buffer_fast_accelerate = GetBooleanField( 1423 rtc_config.audio_jitter_buffer_fast_accelerate = GetBooleanField(
1424 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id); 1424 jni, j_rtc_config, j_audio_jitter_buffer_fast_accelerate_id);
1425 rtc_config.ice_connection_receiving_timeout = 1425 rtc_config.ice_connection_receiving_timeout =
1426 GetIntField(jni, j_rtc_config, j_ice_connection_receiving_timeout_id); 1426 GetIntField(jni, j_rtc_config, j_ice_connection_receiving_timeout_id);
1427 1427
1428 // Create ECDSA certificate. 1428 // Create ECDSA certificate.
1429 if (JavaKeyTypeToNativeType(jni, j_key_type) == rtc::KT_ECDSA) { 1429 if (JavaKeyTypeToNativeType(jni, j_key_type) == rtc::KT_ECDSA) {
1430 scoped_ptr<rtc::SSLIdentity> ssl_identity( 1430 scoped_ptr<rtc::SSLIdentity> ssl_identity(rtc::SSLIdentity::Generate(
1431 rtc::SSLIdentity::Generate(webrtc::kIdentityName, rtc::KT_ECDSA)); 1431 webrtc::kIdentityName, rtc::KeyTypeFull::ECDSA()));
1432 if (ssl_identity.get()) { 1432 if (ssl_identity.get()) {
1433 rtc_config.certificates.push_back( 1433 rtc_config.certificates.push_back(
1434 rtc::RTCCertificate::Create(ssl_identity.Pass())); 1434 rtc::RTCCertificate::Create(ssl_identity.Pass()));
1435 LOG(LS_INFO) << "ECDSA certificate created."; 1435 LOG(LS_INFO) << "ECDSA certificate created.";
1436 } else { 1436 } else {
1437 // Failing to create certificate should not abort peer connection 1437 // Failing to create certificate should not abort peer connection
1438 // creation. Instead default encryption (currently RSA) will be used. 1438 // creation. Instead default encryption (currently RSA) will be used.
1439 LOG(LS_WARNING) << 1439 LOG(LS_WARNING) <<
1440 "Failed to generate SSLIdentity. Default encryption will be used."; 1440 "Failed to generate SSLIdentity. Default encryption will be used.";
1441 } 1441 }
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 rtc::scoped_ptr<jbyte> buffer(static_cast<jbyte*>(malloc(log_size))); 1822 rtc::scoped_ptr<jbyte> buffer(static_cast<jbyte*>(malloc(log_size)));
1823 stream->ReadAll(buffer.get(), log_size, &read, nullptr); 1823 stream->ReadAll(buffer.get(), log_size, &read, nullptr);
1824 1824
1825 jbyteArray result = jni->NewByteArray(read); 1825 jbyteArray result = jni->NewByteArray(read);
1826 jni->SetByteArrayRegion(result, 0, read, buffer.get()); 1826 jni->SetByteArrayRegion(result, 0, read, buffer.get());
1827 1827
1828 return result; 1828 return result;
1829 } 1829 }
1830 1830
1831 } // namespace webrtc_jni 1831 } // namespace webrtc_jni
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698