| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED) | 5 #if !defined(DART_IO_DISABLED) && !defined(DART_IO_SECURE_SOCKET_DISABLED) |
| 6 | 6 |
| 7 #include "platform/globals.h" | 7 #include "platform/globals.h" |
| 8 #if defined(TARGET_OS_ANDROID) || \ | 8 #if defined(TARGET_OS_ANDROID) || \ |
| 9 defined(TARGET_OS_LINUX) || \ | 9 defined(TARGET_OS_LINUX) || \ |
| 10 defined(TARGET_OS_WINDOWS) | 10 defined(TARGET_OS_WINDOWS) |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 return DartUtils::GetBooleanValue(result); | 432 return DartUtils::GetBooleanValue(result); |
| 433 } | 433 } |
| 434 | 434 |
| 435 | 435 |
| 436 void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) { | 436 void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) { |
| 437 SSLFilter::InitializeLibrary(); | 437 SSLFilter::InitializeLibrary(); |
| 438 SSL_CTX* ctx = SSL_CTX_new(TLS_method()); | 438 SSL_CTX* ctx = SSL_CTX_new(TLS_method()); |
| 439 SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, CertificateCallback); | 439 SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, CertificateCallback); |
| 440 SSL_CTX_set_min_version(ctx, TLS1_VERSION); | 440 SSL_CTX_set_min_version(ctx, TLS1_VERSION); |
| 441 SSL_CTX_set_cipher_list(ctx, "HIGH:MEDIUM"); | 441 SSL_CTX_set_cipher_list(ctx, "HIGH:MEDIUM"); |
| 442 SSL_CTX_set_cipher_list_tls11(ctx, "HIGH:MEDIUM"); | |
| 443 SSLContext* context = new SSLContext(ctx); | 442 SSLContext* context = new SSLContext(ctx); |
| 444 Dart_Handle err = SetSecurityContext(args, context); | 443 Dart_Handle err = SetSecurityContext(args, context); |
| 445 if (Dart_IsError(err)) { | 444 if (Dart_IsError(err)) { |
| 446 delete context; | 445 delete context; |
| 447 Dart_PropagateError(err); | 446 Dart_PropagateError(err); |
| 448 } | 447 } |
| 449 } | 448 } |
| 450 | 449 |
| 451 | 450 |
| 452 int PasswordCallback(char* buf, int size, int rwflag, void* userdata) { | 451 int PasswordCallback(char* buf, int size, int rwflag, void* userdata) { |
| (...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 return bytes_processed; | 1791 return bytes_processed; |
| 1793 } | 1792 } |
| 1794 | 1793 |
| 1795 } // namespace bin | 1794 } // namespace bin |
| 1796 } // namespace dart | 1795 } // namespace dart |
| 1797 | 1796 |
| 1798 #endif // defined(TARGET_OS_LINUX) | 1797 #endif // defined(TARGET_OS_LINUX) |
| 1799 | 1798 |
| 1800 #endif // !defined(DART_IO_DISABLED) && | 1799 #endif // !defined(DART_IO_DISABLED) && |
| 1801 // !defined(DART_IO_SECURE_SOCKET_DISABLED) | 1800 // !defined(DART_IO_SECURE_SOCKET_DISABLED) |
| OLD | NEW |