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

Unified Diff: runtime/bin/secure_socket.h

Issue 16858011: dart:io | Enable multithreaded secure networking encryption. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address all comments Created 7 years, 6 months 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
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/secure_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/secure_socket.h
diff --git a/runtime/bin/secure_socket.h b/runtime/bin/secure_socket.h
index c5b42c13aa28f12cb530c0b172ace329dc1db175..88f183922a9fb9a3393435af38d9ecee586e87d8 100644
--- a/runtime/bin/secure_socket.h
+++ b/runtime/bin/secure_socket.h
@@ -22,6 +22,7 @@
#include "bin/dartutils.h"
#include "bin/socket.h"
#include "bin/utils.h"
+#include "bin/native_service.h"
namespace dart {
namespace bin {
@@ -88,18 +89,27 @@ class SSLFilter {
Dart_Handle bad_certificate_callback() {
return Dart_HandleFromPersistent(bad_certificate_callback_);
}
+ intptr_t ProcessReadPlaintextBuffer(int start, int end);
+ intptr_t ProcessWritePlaintextBuffer(int start1, int end1,
+ int start2, int end2);
+ intptr_t ProcessReadEncryptedBuffer(int start, int end);
+ intptr_t ProcessWriteEncryptedBuffer(int start, int end);
+ void ProcessAllBuffers(int starts[kNumBuffers],
+ int ends[kNumBuffers],
+ bool in_handshake);
+ Dart_Handle PeerCertificate();
static void InitializeLibrary(const char* certificate_database,
const char* password,
bool use_builtin_root_certificates,
bool report_duplicate_initialization = true);
- intptr_t ProcessBuffer(int bufferIndex);
- Dart_Handle PeerCertificate();
+ static Dart_Port GetServicePort();
private:
static const int kMemioBufferSize = 20 * KB;
static bool library_initialized_;
static const char* password_;
static dart::Mutex mutex_; // To protect library initialization.
+ static NativeService filter_service_;
uint8_t* buffers_[kNumBuffers];
int buffer_size_;
@@ -114,7 +124,7 @@ class SSLFilter {
char* client_certificate_name_;
PRFileDesc* filter_;
- static bool isEncrypted(int i) {
+ static bool isBufferEncrypted(int i) {
return static_cast<BufferIndex>(i) >= kFirstEncrypted;
}
void InitializeBuffers(Dart_Handle dart_this);
« no previous file with comments | « runtime/bin/io_natives.cc ('k') | runtime/bin/secure_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698