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_MarkAsTrusted)(Dart_NativeArguments args) { |
40 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
41 | "Secure Sockets unsupported on this platform" )); |
42 | } |
43 | |
44 | void FUNCTION_NAME(SecureSocket_NewX509CertificateWrapper)( |
45 | Dart_NativeArguments args) { |
46 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
47 | "Secure Sockets unsupported on this platform" )); |
48 | } |
49 | |
50 | void FUNCTION_NAME(SecureSocket_GetSelectedProtocol)( |
51 | Dart_NativeArguments args) { |
52 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
53 | "Secure Sockets unsupported on this platform" )); |
54 | } |
55 | |
56 | void FUNCTION_NAME(SecureSocket_RegisterHandshakeCompleteCallback)( |
57 | Dart_NativeArguments args) { |
58 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
59 | "Secure Sockets unsupported on this platform" )); |
60 | } |
61 | |
62 | void FUNCTION_NAME(SecureSocket_RegisterBadCertificateCallback)( |
63 | Dart_NativeArguments args) { |
64 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
65 | "Secure Sockets unsupported on this platform" )); |
66 | } |
67 | |
68 | void FUNCTION_NAME(SecureSocket_RegisterKeyLogPort)(Dart_NativeArguments args) { |
69 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
70 | "Secure Sockets unsupported on this platform" )); |
71 | } |
72 | |
73 | void FUNCTION_NAME(SecureSocket_ProcessBuffer)(Dart_NativeArguments args) { |
74 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
75 | "Secure Sockets unsupported on this platform" )); |
76 | } |
77 | |
78 | void FUNCTION_NAME(SecureSocket_InitializeLibrary)(Dart_NativeArguments args) { |
79 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
80 | "Secure Sockets unsupported on this platform" )); |
81 | } |
82 | |
83 | void FUNCTION_NAME(SecureSocket_PeerCertificate)(Dart_NativeArguments args) { |
84 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
85 | "Secure Sockets unsupported on this platform" )); |
86 | } |
87 | |
88 | void FUNCTION_NAME(SecureSocket_FilterPointer)(Dart_NativeArguments args) { |
89 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
90 | "Secure Sockets unsupported on this platform" )); |
91 | } |
92 | |
93 | void FUNCTION_NAME(SecureSocket_NewServicePort)(Dart_NativeArguments args) { |
94 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
95 | "Secure Sockets unsupported on this platform" )); |
96 | } |
97 | |
98 | void FUNCTION_NAME(SecurityContext_Allocate)(Dart_NativeArguments args) { |
99 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
100 | "Secure Sockets unsupported on this platform" )); |
101 | } |
102 | |
103 | void FUNCTION_NAME(SecurityContext_UsePrivateKeyBytes)( |
104 | Dart_NativeArguments args) { |
105 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
106 | "Secure Sockets unsupported on this platform" )); |
107 | } |
108 | |
109 | void FUNCTION_NAME(SecurityContext_SetAlpnProtocols)( |
110 | Dart_NativeArguments args) { |
111 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
112 | "Secure Sockets unsupported on this platform" )); |
113 | } |
114 | |
115 | void FUNCTION_NAME(SecurityContext_SetClientAuthoritiesBytes)( |
116 | Dart_NativeArguments args) { |
117 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
118 | "Secure Sockets unsupported on this platform" )); |
119 | } |
120 | |
121 | void FUNCTION_NAME(SecurityContext_SetTrustedCertificatesBytes)( |
122 | Dart_NativeArguments args) { |
123 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
124 | "Secure Sockets unsupported on this platform" )); |
125 | } |
126 | |
127 | void FUNCTION_NAME(SecurityContext_TrustBuiltinRoots)( |
128 | Dart_NativeArguments args) { |
129 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
130 | "Secure Sockets unsupported on this platform" )); |
131 | } |
132 | |
133 | void FUNCTION_NAME(SecurityContext_SetAllowTlsRenegotiation)( |
134 | Dart_NativeArguments args) { |
135 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
136 | "Secure Sockets unsupported on this platform" )); |
137 | } |
138 | |
139 | void FUNCTION_NAME(SecurityContext_UseCertificateChainBytes)( |
140 | Dart_NativeArguments args) { |
141 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
142 | "Secure Sockets unsupported on this platform" )); |
143 | } |
144 | |
145 | void FUNCTION_NAME(X509_Der)(Dart_NativeArguments args) { |
146 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
147 | "Secure Sockets unsupported on this platform" )); |
148 | } |
149 | |
150 | void FUNCTION_NAME(X509_Sha1)(Dart_NativeArguments args) { |
151 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
152 | "Secure Sockets unsupported on this platform" )); |
153 | } |
154 | |
155 | void FUNCTION_NAME(X509_Subject)(Dart_NativeArguments args) { |
156 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
157 | "Secure Sockets unsupported on this platform" )); |
158 | } |
159 | |
160 | void FUNCTION_NAME(X509_Issuer)(Dart_NativeArguments args) { |
161 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
162 | "Secure Sockets unsupported on this platform" )); |
163 | } |
164 | |
165 | void FUNCTION_NAME(X509_StartValidity)(Dart_NativeArguments args) { |
166 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
167 | "Secure Sockets unsupported on this platform" )); |
168 | } |
169 | |
170 | void FUNCTION_NAME(X509_EndValidity)(Dart_NativeArguments args) { |
171 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
172 | "Secure Sockets unsupported on this platform" )); |
173 | } |
174 | |
175 | void FUNCTION_NAME(X509_Pem)(Dart_NativeArguments args) { |
176 | Dart_ThrowException(DartUtils::NewDartArgumentError( |
177 | "Secure Sockets unsupported on this platform" )); |
178 | } |
179 | |
180 | class SSLFilter { |
181 | public: |
182 | static CObject* ProcessFilterRequest(const CObjectArray& request); |
183 | }; |
184 | |
185 | CObject* SSLFilter::ProcessFilterRequest(const CObjectArray& request) { |
186 | return CObject::IllegalArgumentError(); |
187 | } |
188 | |
189 | } // namespace bin |
190 | } // namespace dart |
191 | |
192 | #endif // defined(DART_IO_SECURE_SOCKET_DISABLED) |
193 | |