| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 {"SRTP_AES128_CM_SHA1_32", SRTP_AES128_CM_SHA1_32}, | 59 {"SRTP_AES128_CM_SHA1_32", SRTP_AES128_CM_SHA1_32}, |
| 60 {"SRTP_AEAD_AES_128_GCM", SRTP_AEAD_AES_128_GCM}, | 60 {"SRTP_AEAD_AES_128_GCM", SRTP_AEAD_AES_128_GCM}, |
| 61 {"SRTP_AEAD_AES_256_GCM", SRTP_AEAD_AES_256_GCM}, | 61 {"SRTP_AEAD_AES_256_GCM", SRTP_AEAD_AES_256_GCM}, |
| 62 {nullptr, 0}}; | 62 {nullptr, 0}}; |
| 63 #endif | 63 #endif |
| 64 | 64 |
| 65 #ifdef OPENSSL_IS_BORINGSSL | 65 #ifdef OPENSSL_IS_BORINGSSL |
| 66 static void TimeCallback(const SSL* ssl, struct timeval* out_clock) { | 66 static void TimeCallback(const SSL* ssl, struct timeval* out_clock) { |
| 67 uint64_t time = TimeNanos(); | 67 uint64_t time = TimeNanos(); |
| 68 out_clock->tv_sec = time / kNumNanosecsPerSec; | 68 out_clock->tv_sec = time / kNumNanosecsPerSec; |
| 69 out_clock->tv_usec = time / kNumNanosecsPerMicrosec; | 69 out_clock->tv_usec = (time % kNumNanosecsPerSec) / kNumNanosecsPerMicrosec; |
| 70 } | 70 } |
| 71 #else // #ifdef OPENSSL_IS_BORINGSSL | 71 #else // #ifdef OPENSSL_IS_BORINGSSL |
| 72 | 72 |
| 73 // Cipher name table. Maps internal OpenSSL cipher ids to the RFC name. | 73 // Cipher name table. Maps internal OpenSSL cipher ids to the RFC name. |
| 74 struct SslCipherMapEntry { | 74 struct SslCipherMapEntry { |
| 75 uint32_t openssl_id; | 75 uint32_t openssl_id; |
| 76 const char* rfc_name; | 76 const char* rfc_name; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #define DEFINE_CIPHER_ENTRY_SSL3(name) {SSL3_CK_##name, "TLS_"#name} | 79 #define DEFINE_CIPHER_ENTRY_SSL3(name) {SSL3_CK_##name, "TLS_"#name} |
| (...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1259 return true; | 1259 return true; |
| 1260 } | 1260 } |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 return false; | 1263 return false; |
| 1264 } | 1264 } |
| 1265 | 1265 |
| 1266 } // namespace rtc | 1266 } // namespace rtc |
| 1267 | 1267 |
| 1268 #endif // HAVE_OPENSSL_SSL_H | 1268 #endif // HAVE_OPENSSL_SSL_H |
| OLD | NEW |