| 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 | 
|---|
| 3 | // BSD-style license that can be found in the LICENSE file. | 
|---|
| 4 |  | 
|---|
| 5 | #if defined(DART_IO_SECURE_SOCKET_DISABLED) | 
|---|
| 6 |  | 
|---|
| 7 | #include "bin/builtin.h" | 
|---|
| 8 | #include "bin/dartutils.h" | 
|---|
| 9 | #include "include/dart_api.h" | 
|---|
| 10 |  | 
|---|
| 11 | namespace dart { | 
|---|
| 12 | namespace bin { | 
|---|
| 13 |  | 
|---|
| 14 | void FUNCTION_NAME(SecureSocket_Init)(Dart_NativeArguments args) { | 
|---|
| 15 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 16 | "Secure Sockets unsupported on this platform")); | 
|---|
| 17 | } | 
|---|
| 18 |  | 
|---|
| 19 | void FUNCTION_NAME(SecureSocket_Connect)(Dart_NativeArguments args) { | 
|---|
| 20 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 21 | "Secure Sockets unsupported on this platform")); | 
|---|
| 22 | } | 
|---|
| 23 |  | 
|---|
| 24 | void FUNCTION_NAME(SecureSocket_AddCertificate)(Dart_NativeArguments args) { | 
|---|
| 25 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 26 | "Secure Sockets unsupported on this platform")); | 
|---|
| 27 | } | 
|---|
| 28 |  | 
|---|
| 29 | void FUNCTION_NAME(SecureSocket_Destroy)(Dart_NativeArguments args) { | 
|---|
| 30 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 31 | "Secure Sockets unsupported on this platform")); | 
|---|
| 32 | } | 
|---|
| 33 |  | 
|---|
| 34 | void FUNCTION_NAME(SecureSocket_Handshake)(Dart_NativeArguments args) { | 
|---|
| 35 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 36 | "Secure Sockets unsupported on this platform")); | 
|---|
| 37 | } | 
|---|
| 38 |  | 
|---|
| 39 | void FUNCTION_NAME(SecureSocket_GetSelectedProtocol)( | 
|---|
| 40 | Dart_NativeArguments args) { | 
|---|
| 41 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 42 | "Secure Sockets unsupported on this platform")); | 
|---|
| 43 | } | 
|---|
| 44 |  | 
|---|
| 45 | void FUNCTION_NAME(SecureSocket_RegisterHandshakeCompleteCallback)( | 
|---|
| 46 | Dart_NativeArguments args) { | 
|---|
| 47 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 48 | "Secure Sockets unsupported on this platform")); | 
|---|
| 49 | } | 
|---|
| 50 |  | 
|---|
| 51 | void FUNCTION_NAME(SecureSocket_RegisterBadCertificateCallback)( | 
|---|
| 52 | Dart_NativeArguments args) { | 
|---|
| 53 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 54 | "Secure Sockets unsupported on this platform")); | 
|---|
| 55 | } | 
|---|
| 56 |  | 
|---|
| 57 | void FUNCTION_NAME(SecureSocket_ProcessBuffer)(Dart_NativeArguments args) { | 
|---|
| 58 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 59 | "Secure Sockets unsupported on this platform")); | 
|---|
| 60 | } | 
|---|
| 61 |  | 
|---|
| 62 | void FUNCTION_NAME(SecureSocket_InitializeLibrary)(Dart_NativeArguments args) { | 
|---|
| 63 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 64 | "Secure Sockets unsupported on this platform")); | 
|---|
| 65 | } | 
|---|
| 66 |  | 
|---|
| 67 | void FUNCTION_NAME(SecureSocket_PeerCertificate)(Dart_NativeArguments args) { | 
|---|
| 68 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 69 | "Secure Sockets unsupported on this platform")); | 
|---|
| 70 | } | 
|---|
| 71 |  | 
|---|
| 72 | void FUNCTION_NAME(SecureSocket_FilterPointer)(Dart_NativeArguments args) { | 
|---|
| 73 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 74 | "Secure Sockets unsupported on this platform")); | 
|---|
| 75 | } | 
|---|
| 76 |  | 
|---|
| 77 | void FUNCTION_NAME(SecureSocket_Renegotiate)(Dart_NativeArguments args) { | 
|---|
| 78 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 79 | "Secure Sockets unsupported on this platform")); | 
|---|
| 80 | } | 
|---|
| 81 |  | 
|---|
| 82 | void FUNCTION_NAME(SecureSocket_NewServicePort)(Dart_NativeArguments args) { | 
|---|
| 83 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 84 | "Secure Sockets unsupported on this platform")); | 
|---|
| 85 | } | 
|---|
| 86 |  | 
|---|
| 87 | void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) { | 
|---|
| 88 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 89 | "Secure Sockets unsupported on this platform")); | 
|---|
| 90 | } | 
|---|
| 91 |  | 
|---|
| 92 | void FUNCTION_NAME(SecurityContext_UsePrivateKeyBytes)( | 
|---|
| 93 | Dart_NativeArguments args) { | 
|---|
| 94 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 95 | "Secure Sockets unsupported on this platform")); | 
|---|
| 96 | } | 
|---|
| 97 |  | 
|---|
| 98 | void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)( | 
|---|
| 99 | Dart_NativeArguments args) { | 
|---|
| 100 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 101 | "Secure Sockets unsupported on this platform")); | 
|---|
| 102 | } | 
|---|
| 103 |  | 
|---|
| 104 | void FUNCTION_NAME(SecurityContext_SetClientAuthoritiesBytes)( | 
|---|
| 105 | Dart_NativeArguments args) { | 
|---|
| 106 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 107 | "Secure Sockets unsupported on this platform")); | 
|---|
| 108 | } | 
|---|
| 109 |  | 
|---|
| 110 | void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)( | 
|---|
| 111 | Dart_NativeArguments args) { | 
|---|
| 112 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 113 | "Secure Sockets unsupported on this platform")); | 
|---|
| 114 | } | 
|---|
| 115 |  | 
|---|
| 116 | void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)( | 
|---|
| 117 | Dart_NativeArguments args) { | 
|---|
| 118 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 119 | "Secure Sockets unsupported on this platform")); | 
|---|
| 120 | } | 
|---|
| 121 |  | 
|---|
| 122 | void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)( | 
|---|
| 123 | Dart_NativeArguments args) { | 
|---|
| 124 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 125 | "Secure Sockets unsupported on this platform")); | 
|---|
| 126 | } | 
|---|
| 127 |  | 
|---|
| 128 | void FUNCTION_NAME(X509_Der)(Dart_NativeArguments args) { | 
|---|
| 129 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 130 | "Secure Sockets unsupported on this platform")); | 
|---|
| 131 | } | 
|---|
| 132 |  | 
|---|
| 133 | void FUNCTION_NAME(X509_Sha1)(Dart_NativeArguments args) { | 
|---|
| 134 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 135 | "Secure Sockets unsupported on this platform")); | 
|---|
| 136 | } | 
|---|
| 137 |  | 
|---|
| 138 | void FUNCTION_NAME(X509_Subject)(Dart_NativeArguments args) { | 
|---|
| 139 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 140 | "Secure Sockets unsupported on this platform")); | 
|---|
| 141 | } | 
|---|
| 142 |  | 
|---|
| 143 | void FUNCTION_NAME(X509_Issuer)(Dart_NativeArguments args) { | 
|---|
| 144 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 145 | "Secure Sockets unsupported on this platform")); | 
|---|
| 146 | } | 
|---|
| 147 |  | 
|---|
| 148 | void FUNCTION_NAME(X509_StartValidity)(Dart_NativeArguments args) { | 
|---|
| 149 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 150 | "Secure Sockets unsupported on this platform")); | 
|---|
| 151 | } | 
|---|
| 152 |  | 
|---|
| 153 | void FUNCTION_NAME(X509_EndValidity)(Dart_NativeArguments args) { | 
|---|
| 154 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 155 | "Secure Sockets unsupported on this platform")); | 
|---|
| 156 | } | 
|---|
| 157 |  | 
|---|
| 158 | void FUNCTION_NAME(X509_Pem)(Dart_NativeArguments args) { | 
|---|
| 159 | Dart_ThrowException(DartUtils::NewDartArgumentError( | 
|---|
| 160 | "Secure Sockets unsupported on this platform")); | 
|---|
| 161 | } | 
|---|
| 162 |  | 
|---|
| 163 | class SSLFilter { | 
|---|
| 164 | public: | 
|---|
| 165 | static CObject* ProcessFilterRequest(const CObjectArray& request); | 
|---|
| 166 | }; | 
|---|
| 167 |  | 
|---|
| 168 | CObject* SSLFilter::ProcessFilterRequest(const CObjectArray& request) { | 
|---|
| 169 | return CObject::IllegalArgumentError(); | 
|---|
| 170 | } | 
|---|
| 171 |  | 
|---|
| 172 | }  // namespace bin | 
|---|
| 173 | }  // namespace dart | 
|---|
| 174 |  | 
|---|
| 175 | #endif  // defined(DART_IO_SECURE_SOCKET_DISABLED) | 
|---|
| 176 |  | 
|---|