| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 std::string* error_desc) const { | 305 std::string* error_desc) const { |
| 306 if (!fingerprint) { | 306 if (!fingerprint) { |
| 307 return BadTransportDescription("No fingerprint.", error_desc); | 307 return BadTransportDescription("No fingerprint.", error_desc); |
| 308 } | 308 } |
| 309 if (!certificate) { | 309 if (!certificate) { |
| 310 return BadTransportDescription( | 310 return BadTransportDescription( |
| 311 "Fingerprint provided but no identity available.", error_desc); | 311 "Fingerprint provided but no identity available.", error_desc); |
| 312 } | 312 } |
| 313 std::unique_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create( | 313 std::unique_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create( |
| 314 fingerprint->algorithm, certificate->identity())); | 314 fingerprint->algorithm, certificate->identity())); |
| 315 ASSERT(fp_tmp.get() != NULL); | 315 RTC_DCHECK(fp_tmp.get() != NULL); |
| 316 if (*fp_tmp == *fingerprint) { | 316 if (*fp_tmp == *fingerprint) { |
| 317 return true; | 317 return true; |
| 318 } | 318 } |
| 319 std::ostringstream desc; | 319 std::ostringstream desc; |
| 320 desc << "Local fingerprint does not match identity. Expected: "; | 320 desc << "Local fingerprint does not match identity. Expected: "; |
| 321 desc << fp_tmp->ToString(); | 321 desc << fp_tmp->ToString(); |
| 322 desc << " Got: " << fingerprint->ToString(); | 322 desc << " Got: " << fingerprint->ToString(); |
| 323 return BadTransportDescription(desc.str(), error_desc); | 323 return BadTransportDescription(desc.str(), error_desc); |
| 324 } | 324 } |
| 325 | 325 |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 } | 474 } |
| 475 | 475 |
| 476 // If local is passive, local will act as server. | 476 // If local is passive, local will act as server. |
| 477 } | 477 } |
| 478 | 478 |
| 479 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; | 479 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; |
| 480 return true; | 480 return true; |
| 481 } | 481 } |
| 482 | 482 |
| 483 } // namespace cricket | 483 } // namespace cricket |
| OLD | NEW |