OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 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 74 matching lines...) Loading... |
85 } | 85 } |
86 } else { | 86 } else { |
87 return BadTransportDescription( | 87 return BadTransportDescription( |
88 "Local fingerprint provided but no identity available.", | 88 "Local fingerprint provided but no identity available.", |
89 error_desc); | 89 error_desc); |
90 } | 90 } |
91 } else { | 91 } else { |
92 certificate_ = nullptr; | 92 certificate_ = nullptr; |
93 } | 93 } |
94 | 94 |
95 // TODO(hbos): SetLocalCertificate | 95 if (!channel->SetLocalCertificate(certificate_)) { |
96 if (!channel->SetLocalIdentity( | |
97 certificate_ ? certificate_->identity() : nullptr)) { | |
98 return BadTransportDescription("Failed to set local identity.", | 96 return BadTransportDescription("Failed to set local identity.", |
99 error_desc); | 97 error_desc); |
100 } | 98 } |
101 | 99 |
102 // Apply the description in the base class. | 100 // Apply the description in the base class. |
103 return Base::ApplyLocalTransportDescription_w(channel, error_desc); | 101 return Base::ApplyLocalTransportDescription_w(channel, error_desc); |
104 } | 102 } |
105 | 103 |
106 bool NegotiateTransportDescription_w(ContentAction local_role, | 104 bool NegotiateTransportDescription_w(ContentAction local_role, |
107 std::string* error_desc) override { | 105 std::string* error_desc) override { |
(...skipping 144 matching lines...) Loading... |
252 | 250 |
253 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; | 251 rtc::scoped_refptr<rtc::RTCCertificate> certificate_; |
254 rtc::SSLRole secure_role_; | 252 rtc::SSLRole secure_role_; |
255 rtc::SSLProtocolVersion ssl_max_version_; | 253 rtc::SSLProtocolVersion ssl_max_version_; |
256 rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_; | 254 rtc::scoped_ptr<rtc::SSLFingerprint> remote_fingerprint_; |
257 }; | 255 }; |
258 | 256 |
259 } // namespace cricket | 257 } // namespace cricket |
260 | 258 |
261 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORT_H_ | 259 #endif // WEBRTC_P2P_BASE_DTLSTRANSPORT_H_ |
OLD | NEW |