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

Unified Diff: runtime/bin/tls_socket.h

Issue 11414009: Secure server sockets for dart:io. Add TlsServerSocket class, providing SSL server sockets. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: runtime/bin/tls_socket.h
diff --git a/runtime/bin/tls_socket.h b/runtime/bin/tls_socket.h
index fc39b70696874c8ee796874152617436b5a84144..407b998ac6e5203705dba963ae1bd2338a1042cf 100644
--- a/runtime/bin/tls_socket.h
+++ b/runtime/bin/tls_socket.h
@@ -66,21 +66,25 @@ class TlsFilter {
string_length_(NULL),
handshake_complete_(NULL),
in_handshake_(false),
- memio_(NULL) { }
+ filter_(NULL) { }
void Init(Dart_Handle dart_this);
- void Connect(const char* host, int port);
+ void Connect(const char* host,
+ int port,
+ bool is_server,
+ const char* certificate_name);
void Destroy();
- void DestroyPlatformIndependent();
void Handshake();
void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete);
- static void InitializeLibrary(const char* pkcert_directory);
+ static void InitializeLibrary(const char* certificate_database,
+ const char* password);
intptr_t ProcessBuffer(int bufferIndex);
private:
static const int kMemioBufferSize = 20 * KB;
static bool library_initialized_;
+ static const char* password_;
static dart::Mutex mutex_; // To protect library initialization.
uint8_t* buffers_[kNumBuffers];
@@ -90,7 +94,8 @@ class TlsFilter {
Dart_Handle dart_buffer_objects_[kNumBuffers];
Dart_Handle handshake_complete_;
bool in_handshake_;
- PRFileDesc* memio_;
+ bool is_server_;
+ PRFileDesc* filter_;
void InitializeBuffers(Dart_Handle dart_this);
void InitializePlatformData();

Powered by Google App Engine
This is Rietveld 408576698