| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 if (current_cipher == NULL) { | 377 if (current_cipher == NULL) { |
| 378 return false; | 378 return false; |
| 379 } | 379 } |
| 380 | 380 |
| 381 *cipher = static_cast<uint16_t>(SSL_CIPHER_get_id(current_cipher)); | 381 *cipher = static_cast<uint16_t>(SSL_CIPHER_get_id(current_cipher)); |
| 382 return true; | 382 return true; |
| 383 } | 383 } |
| 384 | 384 |
| 385 // Key Extractor interface | 385 // Key Extractor interface |
| 386 bool OpenSSLStreamAdapter::ExportKeyingMaterial(const std::string& label, | 386 bool OpenSSLStreamAdapter::ExportKeyingMaterial(const std::string& label, |
| 387 const uint8* context, | 387 const uint8_t* context, |
| 388 size_t context_len, | 388 size_t context_len, |
| 389 bool use_context, | 389 bool use_context, |
| 390 uint8* result, | 390 uint8_t* result, |
| 391 size_t result_len) { | 391 size_t result_len) { |
| 392 #ifdef HAVE_DTLS_SRTP | 392 #ifdef HAVE_DTLS_SRTP |
| 393 int i; | 393 int i; |
| 394 | 394 |
| 395 i = SSL_export_keying_material(ssl_, result, result_len, | 395 i = SSL_export_keying_material(ssl_, result, result_len, label.c_str(), |
| 396 label.c_str(), label.length(), | 396 label.length(), const_cast<uint8_t*>(context), |
| 397 const_cast<uint8 *>(context), | |
| 398 context_len, use_context); | 397 context_len, use_context); |
| 399 | 398 |
| 400 if (i != 1) | 399 if (i != 1) |
| 401 return false; | 400 return false; |
| 402 | 401 |
| 403 return true; | 402 return true; |
| 404 #else | 403 #else |
| 405 return false; | 404 return false; |
| 406 #endif | 405 #endif |
| 407 } | 406 } |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1169 } | 1168 } |
| 1170 } else { | 1169 } else { |
| 1171 RTC_NOTREACHED(); | 1170 RTC_NOTREACHED(); |
| 1172 return kDefaultSslEcCipher12; | 1171 return kDefaultSslEcCipher12; |
| 1173 } | 1172 } |
| 1174 } | 1173 } |
| 1175 | 1174 |
| 1176 } // namespace rtc | 1175 } // namespace rtc |
| 1177 | 1176 |
| 1178 #endif // HAVE_OPENSSL_SSL_H | 1177 #endif // HAVE_OPENSSL_SSL_H |
| OLD | NEW |