OLD | NEW |
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 #ifndef BIN_SECURE_SOCKET_H_ | 5 #ifndef BIN_SECURE_SOCKET_H_ |
6 #define BIN_SECURE_SOCKET_H_ | 6 #define BIN_SECURE_SOCKET_H_ |
7 | 7 |
8 #include <stdlib.h> | 8 #include <stdlib.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <stdio.h> | 10 #include <stdio.h> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 kWriteEncrypted, | 61 kWriteEncrypted, |
62 kNumBuffers | 62 kNumBuffers |
63 }; | 63 }; |
64 | 64 |
65 SSLFilter() | 65 SSLFilter() |
66 : string_start_(NULL), | 66 : string_start_(NULL), |
67 string_length_(NULL), | 67 string_length_(NULL), |
68 handshake_complete_(NULL), | 68 handshake_complete_(NULL), |
69 bad_certificate_callback_(NULL), | 69 bad_certificate_callback_(NULL), |
70 in_handshake_(false), | 70 in_handshake_(false), |
| 71 client_certificate_name_(NULL), |
71 filter_(NULL) { } | 72 filter_(NULL) { } |
72 | 73 |
73 void Init(Dart_Handle dart_this); | 74 void Init(Dart_Handle dart_this); |
74 void Connect(const char* host, | 75 void Connect(const char* host, |
75 int port, | 76 int port, |
76 bool is_server, | 77 bool is_server, |
77 const char* certificate_name, | 78 const char* certificate_name, |
78 bool request_client_certificate, | 79 bool request_client_certificate, |
79 bool require_client_certificate, | 80 bool require_client_certificate, |
80 bool send_client_certificate); | 81 bool send_client_certificate); |
(...skipping 16 matching lines...) Expand all Loading... |
97 | 98 |
98 uint8_t* buffers_[kNumBuffers]; | 99 uint8_t* buffers_[kNumBuffers]; |
99 int64_t buffer_size_; | 100 int64_t buffer_size_; |
100 Dart_Handle string_start_; | 101 Dart_Handle string_start_; |
101 Dart_Handle string_length_; | 102 Dart_Handle string_length_; |
102 Dart_Handle dart_buffer_objects_[kNumBuffers]; | 103 Dart_Handle dart_buffer_objects_[kNumBuffers]; |
103 Dart_Handle handshake_complete_; | 104 Dart_Handle handshake_complete_; |
104 Dart_Handle bad_certificate_callback_; | 105 Dart_Handle bad_certificate_callback_; |
105 bool in_handshake_; | 106 bool in_handshake_; |
106 bool is_server_; | 107 bool is_server_; |
| 108 char* client_certificate_name_; |
107 PRFileDesc* filter_; | 109 PRFileDesc* filter_; |
108 | 110 |
109 void InitializeBuffers(Dart_Handle dart_this); | 111 void InitializeBuffers(Dart_Handle dart_this); |
110 void InitializePlatformData(); | 112 void InitializePlatformData(); |
111 | 113 |
112 DISALLOW_COPY_AND_ASSIGN(SSLFilter); | 114 DISALLOW_COPY_AND_ASSIGN(SSLFilter); |
113 }; | 115 }; |
114 | 116 |
115 #endif // BIN_SECURE_SOCKET_H_ | 117 #endif // BIN_SECURE_SOCKET_H_ |
OLD | NEW |