| 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) || defined(TARGET_OS_LINUX) || \ | 8 #if defined(TARGET_OS_ANDROID) || defined(TARGET_OS_LINUX) || \ |
| 9 defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_FUCHSIA) | 9 defined(TARGET_OS_WINDOWS) || defined(TARGET_OS_FUCHSIA) |
| 10 | 10 |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 return 0; | 425 return 0; |
| 426 } | 426 } |
| 427 return DartUtils::GetBooleanValue(result); | 427 return DartUtils::GetBooleanValue(result); |
| 428 } | 428 } |
| 429 | 429 |
| 430 | 430 |
| 431 void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) { | 431 void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) { |
| 432 SSLFilter::InitializeLibrary(); | 432 SSLFilter::InitializeLibrary(); |
| 433 SSL_CTX* ctx = SSL_CTX_new(TLS_method()); | 433 SSL_CTX* ctx = SSL_CTX_new(TLS_method()); |
| 434 SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, CertificateCallback); | 434 SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, CertificateCallback); |
| 435 SSL_CTX_set_min_version(ctx, TLS1_VERSION); | 435 SSL_CTX_set_min_proto_version(ctx, TLS1_VERSION); |
| 436 SSL_CTX_set_cipher_list(ctx, "HIGH:MEDIUM"); | 436 SSL_CTX_set_cipher_list(ctx, "HIGH:MEDIUM"); |
| 437 SSLContext* context = new SSLContext(ctx); | 437 SSLContext* context = new SSLContext(ctx); |
| 438 Dart_Handle err = SetSecurityContext(args, context); | 438 Dart_Handle err = SetSecurityContext(args, context); |
| 439 if (Dart_IsError(err)) { | 439 if (Dart_IsError(err)) { |
| 440 delete context; | 440 delete context; |
| 441 Dart_PropagateError(err); | 441 Dart_PropagateError(err); |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 | 444 |
| 445 | 445 |
| (...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1786 return bytes_processed; | 1786 return bytes_processed; |
| 1787 } | 1787 } |
| 1788 | 1788 |
| 1789 } // namespace bin | 1789 } // namespace bin |
| 1790 } // namespace dart | 1790 } // namespace dart |
| 1791 | 1791 |
| 1792 #endif // defined(TARGET_OS_LINUX) | 1792 #endif // defined(TARGET_OS_LINUX) |
| 1793 | 1793 |
| 1794 #endif // !defined(DART_IO_DISABLED) && | 1794 #endif // !defined(DART_IO_DISABLED) && |
| 1795 // !defined(DART_IO_SECURE_SOCKET_DISABLED) | 1795 // !defined(DART_IO_SECURE_SOCKET_DISABLED) |
| OLD | NEW |