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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 if (!ssl_cipher) { | 358 if (!ssl_cipher) { |
359 return std::string(); | 359 return std::string(); |
360 } | 360 } |
361 char* cipher_name = SSL_CIPHER_get_rfc_name(ssl_cipher); | 361 char* cipher_name = SSL_CIPHER_get_rfc_name(ssl_cipher); |
362 std::string rfc_name = std::string(cipher_name); | 362 std::string rfc_name = std::string(cipher_name); |
363 OPENSSL_free(cipher_name); | 363 OPENSSL_free(cipher_name); |
364 return rfc_name; | 364 return rfc_name; |
365 #else | 365 #else |
366 for (const SslCipherMapEntry* entry = kSslCipherMap; entry->rfc_name; | 366 for (const SslCipherMapEntry* entry = kSslCipherMap; entry->rfc_name; |
367 ++entry) { | 367 ++entry) { |
368 if (cipher_suite == entry->openssl_id) { | 368 if (cipher_suite == static_cast<int>(entry->openssl_id)) { |
369 return entry->rfc_name; | 369 return entry->rfc_name; |
370 } | 370 } |
371 } | 371 } |
372 return std::string(); | 372 return std::string(); |
373 #endif | 373 #endif |
374 } | 374 } |
375 | 375 |
376 bool OpenSSLStreamAdapter::GetSslCipherSuite(int* cipher_suite) { | 376 bool OpenSSLStreamAdapter::GetSslCipherSuite(int* cipher_suite) { |
377 if (state_ != SSL_CONNECTED) | 377 if (state_ != SSL_CONNECTED) |
378 return false; | 378 return false; |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1163 } | 1163 } |
1164 } else { | 1164 } else { |
1165 RTC_NOTREACHED(); | 1165 RTC_NOTREACHED(); |
1166 return kDefaultSslEcCipher12; | 1166 return kDefaultSslEcCipher12; |
1167 } | 1167 } |
1168 } | 1168 } |
1169 | 1169 |
1170 } // namespace rtc | 1170 } // namespace rtc |
1171 | 1171 |
1172 #endif // HAVE_OPENSSL_SSL_H | 1172 #endif // HAVE_OPENSSL_SSL_H |
OLD | NEW |