Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Side by Side Diff: runtime/bin/io_natives.cc

Issue 11415290: Add a callback to SecureSocket for certificates that fail to be authenticated. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Free persistent handle upon destruction. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/secure_socket.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "bin/io_natives.h" 5 #include "bin/io_natives.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "bin/builtin.h" 10 #include "bin/builtin.h"
(...skipping 27 matching lines...) Expand all
38 V(Socket_GetPort, 1) \ 38 V(Socket_GetPort, 1) \
39 V(Socket_GetRemotePeer, 1) \ 39 V(Socket_GetRemotePeer, 1) \
40 V(Socket_GetError, 1) \ 40 V(Socket_GetError, 1) \
41 V(Socket_GetStdioHandle, 2) \ 41 V(Socket_GetStdioHandle, 2) \
42 V(Socket_NewServicePort, 0) \ 42 V(Socket_NewServicePort, 0) \
43 V(SecureSocket_Connect, 5) \ 43 V(SecureSocket_Connect, 5) \
44 V(SecureSocket_Destroy, 1) \ 44 V(SecureSocket_Destroy, 1) \
45 V(SecureSocket_Handshake, 1) \ 45 V(SecureSocket_Handshake, 1) \
46 V(SecureSocket_Init, 1) \ 46 V(SecureSocket_Init, 1) \
47 V(SecureSocket_ProcessBuffer, 2) \ 47 V(SecureSocket_ProcessBuffer, 2) \
48 V(SecureSocket_RegisterBadCertificateCallback, 2) \
48 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \ 49 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \
49 V(SecureSocket_InitializeLibrary, 3) 50 V(SecureSocket_InitializeLibrary, 3)
50 51
51 IO_NATIVE_LIST(DECLARE_FUNCTION); 52 IO_NATIVE_LIST(DECLARE_FUNCTION);
52 53
53 static struct NativeEntries { 54 static struct NativeEntries {
54 const char* name_; 55 const char* name_;
55 Dart_NativeFunction function_; 56 Dart_NativeFunction function_;
56 int argument_count_; 57 int argument_count_;
57 } IOEntries[] = { 58 } IOEntries[] = {
(...skipping 10 matching lines...) Expand all
68 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); 69 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries);
69 for (int i = 0; i < num_entries; i++) { 70 for (int i = 0; i < num_entries; i++) {
70 struct NativeEntries* entry = &(IOEntries[i]); 71 struct NativeEntries* entry = &(IOEntries[i]);
71 if (!strcmp(function_name, entry->name_) && 72 if (!strcmp(function_name, entry->name_) &&
72 (entry->argument_count_ == argument_count)) { 73 (entry->argument_count_ == argument_count)) {
73 return reinterpret_cast<Dart_NativeFunction>(entry->function_); 74 return reinterpret_cast<Dart_NativeFunction>(entry->function_);
74 } 75 }
75 } 76 }
76 return NULL; 77 return NULL;
77 } 78 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/secure_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698