| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 std::string* error_desc) const { | 306 std::string* error_desc) const { |
| 307 if (!fingerprint) { | 307 if (!fingerprint) { |
| 308 return BadTransportDescription("No fingerprint.", error_desc); | 308 return BadTransportDescription("No fingerprint.", error_desc); |
| 309 } | 309 } |
| 310 if (!certificate) { | 310 if (!certificate) { |
| 311 return BadTransportDescription( | 311 return BadTransportDescription( |
| 312 "Fingerprint provided but no identity available.", error_desc); | 312 "Fingerprint provided but no identity available.", error_desc); |
| 313 } | 313 } |
| 314 std::unique_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create( | 314 std::unique_ptr<rtc::SSLFingerprint> fp_tmp(rtc::SSLFingerprint::Create( |
| 315 fingerprint->algorithm, certificate->identity())); | 315 fingerprint->algorithm, certificate->identity())); |
| 316 RTC_DCHECK(fp_tmp.get() != NULL); | 316 RTC_DCHECK(fp_tmp.get() != nullptr); |
| 317 if (*fp_tmp == *fingerprint) { | 317 if (*fp_tmp == *fingerprint) { |
| 318 return true; | 318 return true; |
| 319 } | 319 } |
| 320 std::ostringstream desc; | 320 std::ostringstream desc; |
| 321 desc << "Local fingerprint does not match identity. Expected: "; | 321 desc << "Local fingerprint does not match identity. Expected: "; |
| 322 desc << fp_tmp->ToString(); | 322 desc << fp_tmp->ToString(); |
| 323 desc << " Got: " << fingerprint->ToString(); | 323 desc << " Got: " << fingerprint->ToString(); |
| 324 return BadTransportDescription(desc.str(), error_desc); | 324 return BadTransportDescription(desc.str(), error_desc); |
| 325 } | 325 } |
| 326 | 326 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 } | 483 } |
| 484 | 484 |
| 485 // If local is passive, local will act as server. | 485 // If local is passive, local will act as server. |
| 486 } | 486 } |
| 487 | 487 |
| 488 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; | 488 *ssl_role = is_remote_server ? rtc::SSL_CLIENT : rtc::SSL_SERVER; |
| 489 return true; | 489 return true; |
| 490 } | 490 } |
| 491 | 491 |
| 492 } // namespace cricket | 492 } // namespace cricket |
| OLD | NEW |