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 |
11 #include "webrtc/base/opensslstreamadapter.h" | 11 #include "webrtc/rtc_base/opensslstreamadapter.h" |
12 | 12 |
13 #include <openssl/bio.h> | 13 #include <openssl/bio.h> |
14 #include <openssl/crypto.h> | 14 #include <openssl/crypto.h> |
15 #include <openssl/err.h> | 15 #include <openssl/err.h> |
16 #include <openssl/rand.h> | 16 #include <openssl/rand.h> |
17 #include <openssl/tls1.h> | 17 #include <openssl/tls1.h> |
18 #include <openssl/x509v3.h> | 18 #include <openssl/x509v3.h> |
19 #ifndef OPENSSL_IS_BORINGSSL | 19 #ifndef OPENSSL_IS_BORINGSSL |
20 #include <openssl/dtls1.h> | 20 #include <openssl/dtls1.h> |
21 #include <openssl/ssl.h> | 21 #include <openssl/ssl.h> |
22 #endif | 22 #endif |
23 | 23 |
24 #include <memory> | 24 #include <memory> |
25 #include <vector> | 25 #include <vector> |
26 | 26 |
27 #include "webrtc/base/checks.h" | 27 #include "webrtc/rtc_base/checks.h" |
28 #include "webrtc/base/logging.h" | 28 #include "webrtc/rtc_base/logging.h" |
29 #include "webrtc/base/safe_conversions.h" | 29 #include "webrtc/rtc_base/openssl.h" |
30 #include "webrtc/base/stream.h" | 30 #include "webrtc/rtc_base/openssladapter.h" |
31 #include "webrtc/base/openssl.h" | 31 #include "webrtc/rtc_base/openssldigest.h" |
32 #include "webrtc/base/openssladapter.h" | 32 #include "webrtc/rtc_base/opensslidentity.h" |
33 #include "webrtc/base/openssldigest.h" | 33 #include "webrtc/rtc_base/safe_conversions.h" |
34 #include "webrtc/base/opensslidentity.h" | 34 #include "webrtc/rtc_base/stream.h" |
35 #include "webrtc/base/stringutils.h" | 35 #include "webrtc/rtc_base/stringutils.h" |
36 #include "webrtc/base/timeutils.h" | 36 #include "webrtc/rtc_base/thread.h" |
37 #include "webrtc/base/thread.h" | 37 #include "webrtc/rtc_base/timeutils.h" |
38 | 38 |
39 namespace { | 39 namespace { |
40 bool g_use_time_callback_for_testing = false; | 40 bool g_use_time_callback_for_testing = false; |
41 } | 41 } |
42 | 42 |
43 namespace rtc { | 43 namespace rtc { |
44 | 44 |
45 #if (OPENSSL_VERSION_NUMBER < 0x10001000L) | 45 #if (OPENSSL_VERSION_NUMBER < 0x10001000L) |
46 #error "webrtc requires at least OpenSSL version 1.0.1, to support DTLS-SRTP" | 46 #error "webrtc requires at least OpenSSL version 1.0.1, to support DTLS-SRTP" |
47 #endif | 47 #endif |
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 } | 1210 } |
1211 | 1211 |
1212 return false; | 1212 return false; |
1213 } | 1213 } |
1214 | 1214 |
1215 void OpenSSLStreamAdapter::enable_time_callback_for_testing() { | 1215 void OpenSSLStreamAdapter::enable_time_callback_for_testing() { |
1216 g_use_time_callback_for_testing = true; | 1216 g_use_time_callback_for_testing = true; |
1217 } | 1217 } |
1218 | 1218 |
1219 } // namespace rtc | 1219 } // namespace rtc |
OLD | NEW |