OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |