| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 "bin/security_context.h" | 7 #include "bin/security_context.h" |
| 8 | 8 |
| 9 #include <openssl/bio.h> | 9 #include <openssl/bio.h> |
| 10 #include <openssl/err.h> | 10 #include <openssl/err.h> |
| (...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 ASSERT(context != NULL); | 802 ASSERT(context != NULL); |
| 803 ASSERT(password != NULL); | 803 ASSERT(password != NULL); |
| 804 | 804 |
| 805 int status = context->UseCertificateChainBytes(cert_chain_bytes, password); | 805 int status = context->UseCertificateChainBytes(cert_chain_bytes, password); |
| 806 | 806 |
| 807 SecureSocketUtils::CheckStatus(status, "TlsException", | 807 SecureSocketUtils::CheckStatus(status, "TlsException", |
| 808 "Failure in useCertificateChainBytes"); | 808 "Failure in useCertificateChainBytes"); |
| 809 } | 809 } |
| 810 | 810 |
| 811 | 811 |
| 812 void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) { | |
| 813 Dart_SetReturnValue(args, Dart_NewBoolean(true)); | |
| 814 } | |
| 815 | |
| 816 | |
| 817 void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)( | 812 void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)( |
| 818 Dart_NativeArguments args) { | 813 Dart_NativeArguments args) { |
| 819 SSLCertContext* context = SSLCertContext::GetSecurityContext(args); | 814 SSLCertContext* context = SSLCertContext::GetSecurityContext(args); |
| 820 | 815 |
| 821 ASSERT(context != NULL); | 816 ASSERT(context != NULL); |
| 822 | 817 |
| 823 context->TrustBuiltinRoots(); | 818 context->TrustBuiltinRoots(); |
| 824 } | 819 } |
| 825 | 820 |
| 826 | 821 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 857 Dart_ThrowException(DartUtils::NewDartArgumentError( | 852 Dart_ThrowException(DartUtils::NewDartArgumentError( |
| 858 "Non-boolean is_server argument passed to SetAlpnProtocols")); | 853 "Non-boolean is_server argument passed to SetAlpnProtocols")); |
| 859 } | 854 } |
| 860 } | 855 } |
| 861 | 856 |
| 862 } // namespace bin | 857 } // namespace bin |
| 863 } // namespace dart | 858 } // namespace dart |
| 864 | 859 |
| 865 #endif // !defined(DART_IO_DISABLED) && | 860 #endif // !defined(DART_IO_DISABLED) && |
| 866 // !defined(DART_IO_SECURE_SOCKET_DISABLED) | 861 // !defined(DART_IO_SECURE_SOCKET_DISABLED) |
| OLD | NEW |