| Index: runtime/bin/secure_socket_macos.cc
|
| diff --git a/runtime/bin/secure_socket_unsupported.cc b/runtime/bin/secure_socket_macos.cc
|
| similarity index 90%
|
| copy from runtime/bin/secure_socket_unsupported.cc
|
| copy to runtime/bin/secure_socket_macos.cc
|
| index 91f4fc7a49897ed8865137e63b63cfcdcfda5185..b04d9a3db752bf7ebf1daa6fbee53ce6cd88debf 100644
|
| --- a/runtime/bin/secure_socket_unsupported.cc
|
| +++ b/runtime/bin/secure_socket_macos.cc
|
| @@ -1,13 +1,21 @@
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| +#include "platform/globals.h"
|
| +#if defined(TARGET_OS_MACOS)
|
| +
|
| +#include "bin/secure_socket.h"
|
| +#include "bin/secure_socket_macos.h"
|
| +
|
| +#include <CoreFoundation/CoreFoundation.h>
|
| +#include <Security/SecureTransport.h>
|
| +#include <Security/Security.h>
|
| +
|
| #include "bin/builtin.h"
|
| #include "bin/dartutils.h"
|
| -
|
| #include "include/dart_api.h"
|
|
|
| -
|
| namespace dart {
|
| namespace bin {
|
|
|
| @@ -99,71 +107,84 @@ void FUNCTION_NAME(SecureSocket_NewServicePort)(Dart_NativeArguments args) {
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(SecurityContext_UsePrivateKeyBytes)(
|
| Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)(
|
| Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(SecurityContext_SetClientAuthoritiesBytes)(
|
| Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)(
|
| Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| +void FUNCTION_NAME(SecurityContext_AlpnSupported)(Dart_NativeArguments args) {
|
| + Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| + "Secure Sockets unsupported on this platform"));
|
| +}
|
| +
|
| +
|
| void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)(
|
| Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)(
|
| Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(X509_Subject)(Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(X509_Issuer)(Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(X509_StartValidity)(Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| +
|
| void FUNCTION_NAME(X509_EndValidity)(Dart_NativeArguments args) {
|
| Dart_ThrowException(DartUtils::NewDartArgumentError(
|
| "Secure Sockets unsupported on this platform"));
|
| }
|
|
|
| -class SSLFilter {
|
| - public:
|
| - static CObject* ProcessFilterRequest(const CObjectArray& request);
|
| -};
|
|
|
| CObject* SSLFilter::ProcessFilterRequest(const CObjectArray& request) {
|
| return CObject::IllegalArgumentError();
|
| @@ -171,3 +192,5 @@ CObject* SSLFilter::ProcessFilterRequest(const CObjectArray& request) {
|
|
|
| } // namespace bin
|
| } // namespace dart
|
| +
|
| +#endif // defined(TARGET_OS_MACOS)
|
|
|