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 283 matching lines...) Loading... |
294 } | 294 } |
295 | 295 |
296 ///////////////////////////////////////////////////////////////////////////// | 296 ///////////////////////////////////////////////////////////////////////////// |
297 // OpenSSLStreamAdapter | 297 // OpenSSLStreamAdapter |
298 ///////////////////////////////////////////////////////////////////////////// | 298 ///////////////////////////////////////////////////////////////////////////// |
299 | 299 |
300 OpenSSLStreamAdapter::OpenSSLStreamAdapter(StreamInterface* stream) | 300 OpenSSLStreamAdapter::OpenSSLStreamAdapter(StreamInterface* stream) |
301 : SSLStreamAdapter(stream), | 301 : SSLStreamAdapter(stream), |
302 state_(SSL_NONE), | 302 state_(SSL_NONE), |
303 role_(SSL_CLIENT), | 303 role_(SSL_CLIENT), |
304 ssl_read_needs_write_(false), ssl_write_needs_read_(false), | 304 ssl_read_needs_write_(false), |
305 ssl_(NULL), ssl_ctx_(NULL), | 305 ssl_write_needs_read_(false), |
| 306 ssl_(NULL), |
| 307 ssl_ctx_(NULL), |
306 custom_verification_succeeded_(false), | 308 custom_verification_succeeded_(false), |
307 ssl_mode_(SSL_MODE_TLS), | 309 ssl_mode_(SSL_MODE_TLS), |
308 ssl_max_version_(SSL_PROTOCOL_TLS_11) { | 310 ssl_max_version_(SSL_PROTOCOL_TLS_12) {} |
309 } | |
310 | 311 |
311 OpenSSLStreamAdapter::~OpenSSLStreamAdapter() { | 312 OpenSSLStreamAdapter::~OpenSSLStreamAdapter() { |
312 Cleanup(); | 313 Cleanup(); |
313 } | 314 } |
314 | 315 |
315 void OpenSSLStreamAdapter::SetIdentity(SSLIdentity* identity) { | 316 void OpenSSLStreamAdapter::SetIdentity(SSLIdentity* identity) { |
316 ASSERT(!identity_); | 317 ASSERT(!identity_); |
317 identity_.reset(static_cast<OpenSSLIdentity*>(identity)); | 318 identity_.reset(static_cast<OpenSSLIdentity*>(identity)); |
318 } | 319 } |
319 | 320 |
(...skipping 843 matching lines...) Loading... |
1163 } | 1164 } |
1164 } else { | 1165 } else { |
1165 RTC_NOTREACHED(); | 1166 RTC_NOTREACHED(); |
1166 return kDefaultSslEcCipher12; | 1167 return kDefaultSslEcCipher12; |
1167 } | 1168 } |
1168 } | 1169 } |
1169 | 1170 |
1170 } // namespace rtc | 1171 } // namespace rtc |
1171 | 1172 |
1172 #endif // HAVE_OPENSSL_SSL_H | 1173 #endif // HAVE_OPENSSL_SSL_H |
OLD | NEW |