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

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel_unittest.cc

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: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 use_dtls_srtp_(false), 56 use_dtls_srtp_(false),
57 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10), 57 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10),
58 negotiated_dtls_(false), 58 negotiated_dtls_(false),
59 received_dtls_client_hello_(false), 59 received_dtls_client_hello_(false),
60 received_dtls_server_hello_(false) { 60 received_dtls_server_hello_(false) {
61 } 61 }
62 void SetIceProtocol(cricket::TransportProtocol proto) { 62 void SetIceProtocol(cricket::TransportProtocol proto) {
63 protocol_ = proto; 63 protocol_ = proto;
64 } 64 }
65 void CreateIdentity() { 65 void CreateIdentity() {
66 identity_.reset(rtc::SSLIdentity::Generate(name_)); 66 identity_.reset(rtc::SSLIdentity::Generate(name_, rtc::KT_RSA));
67 } 67 }
68 rtc::SSLIdentity* identity() { return identity_.get(); } 68 rtc::SSLIdentity* identity() { return identity_.get(); }
69 void SetupSrtp() { 69 void SetupSrtp() {
70 ASSERT(identity_.get() != NULL); 70 ASSERT(identity_.get() != NULL);
71 use_dtls_srtp_ = true; 71 use_dtls_srtp_ = true;
72 } 72 }
73 void SetupMaxProtocolVersion(rtc::SSLProtocolVersion version) { 73 void SetupMaxProtocolVersion(rtc::SSLProtocolVersion version) {
74 ASSERT(transport_.get() == NULL); 74 ASSERT(transport_.get() == NULL);
75 ssl_max_version_ = version; 75 ssl_max_version_ = version;
76 } 76 }
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 // Each side's remote certificate is the other side's local certificate. 895 // Each side's remote certificate is the other side's local certificate.
896 ASSERT_TRUE( 896 ASSERT_TRUE(
897 client1_.transport()->GetRemoteCertificate(remote_cert1.accept())); 897 client1_.transport()->GetRemoteCertificate(remote_cert1.accept()));
898 ASSERT_EQ(remote_cert1->ToPEMString(), 898 ASSERT_EQ(remote_cert1->ToPEMString(),
899 identity2->certificate().ToPEMString()); 899 identity2->certificate().ToPEMString());
900 ASSERT_TRUE( 900 ASSERT_TRUE(
901 client2_.transport()->GetRemoteCertificate(remote_cert2.accept())); 901 client2_.transport()->GetRemoteCertificate(remote_cert2.accept()));
902 ASSERT_EQ(remote_cert2->ToPEMString(), 902 ASSERT_EQ(remote_cert2->ToPEMString(),
903 identity1->certificate().ToPEMString()); 903 identity1->certificate().ToPEMString());
904 } 904 }
OLDNEW
« webrtc/base/opensslidentity.cc ('K') | « webrtc/base/sslstreamadapter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698