Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: webrtc/base/opensslstreamadapter.cc

Issue 1753293002: Safe numeric library: base/numerics (copied from Chromium) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: safe_math[_impl].h updated for WebRTC (Check delta with PS3) Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #if HAVE_CONFIG_H 11 #if HAVE_CONFIG_H
12 #include "config.h" 12 #include "config.h"
13 #endif // HAVE_CONFIG_H 13 #endif // HAVE_CONFIG_H
14 14
15 #if HAVE_OPENSSL_SSL_H 15 #if HAVE_OPENSSL_SSL_H
16 16
17 #include "webrtc/base/opensslstreamadapter.h" 17 #include "webrtc/base/opensslstreamadapter.h"
18 18
19 #include <openssl/bio.h> 19 #include <openssl/bio.h>
20 #include <openssl/crypto.h> 20 #include <openssl/crypto.h>
21 #include <openssl/err.h> 21 #include <openssl/err.h>
22 #include <openssl/rand.h> 22 #include <openssl/rand.h>
23 #include <openssl/tls1.h> 23 #include <openssl/tls1.h>
24 #include <openssl/x509v3.h> 24 #include <openssl/x509v3.h>
25 25
26 #include <vector> 26 #include <vector>
27 27
28 #include "webrtc/base/common.h" 28 #include "webrtc/base/common.h"
29 #include "webrtc/base/logging.h" 29 #include "webrtc/base/logging.h"
30 #include "webrtc/base/safe_conversions.h"
31 #include "webrtc/base/stream.h" 30 #include "webrtc/base/stream.h"
32 #include "webrtc/base/openssl.h" 31 #include "webrtc/base/openssl.h"
33 #include "webrtc/base/openssladapter.h" 32 #include "webrtc/base/openssladapter.h"
34 #include "webrtc/base/openssldigest.h" 33 #include "webrtc/base/openssldigest.h"
35 #include "webrtc/base/opensslidentity.h" 34 #include "webrtc/base/opensslidentity.h"
36 #include "webrtc/base/stringutils.h" 35 #include "webrtc/base/stringutils.h"
37 #include "webrtc/base/thread.h" 36 #include "webrtc/base/thread.h"
37 #include "webrtc/base/numerics/safe_conversions.h"
38 38
39 namespace rtc { 39 namespace rtc {
40 40
41 #if (OPENSSL_VERSION_NUMBER >= 0x10001000L) 41 #if (OPENSSL_VERSION_NUMBER >= 0x10001000L)
42 #define HAVE_DTLS_SRTP 42 #define HAVE_DTLS_SRTP
43 #endif 43 #endif
44 44
45 #ifdef HAVE_DTLS_SRTP 45 #ifdef HAVE_DTLS_SRTP
46 // SRTP cipher suite table. |internal_name| is used to construct a 46 // SRTP cipher suite table. |internal_name| is used to construct a
47 // colon-separated profile strings which is needed by 47 // colon-separated profile strings which is needed by
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 } 1185 }
1186 } else { 1186 } else {
1187 RTC_NOTREACHED(); 1187 RTC_NOTREACHED();
1188 return kDefaultSslEcCipher12; 1188 return kDefaultSslEcCipher12;
1189 } 1189 }
1190 } 1190 }
1191 1191
1192 } // namespace rtc 1192 } // namespace rtc
1193 1193
1194 #endif // HAVE_OPENSSL_SSL_H 1194 #endif // HAVE_OPENSSL_SSL_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698