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

Unified Diff: runtime/bin/secure_socket.h

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 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 a8e0a39a3a97bdf197a6b26283da1e8f66722689..520693af20ba13e0d904c7ae0ed867662823577f 100644
--- a/runtime/bin/secure_socket.h
+++ b/runtime/bin/secure_socket.h
@@ -13,6 +13,7 @@
#include <prinit.h>
#include <prerror.h>
#include <prnetdb.h>
+#include <ssl.h>
#include "bin/builtin.h"
#include "bin/dartutils.h"
@@ -65,6 +66,7 @@ class SSLFilter {
: string_start_(NULL),
string_length_(NULL),
handshake_complete_(NULL),
+ bad_certificate_callback_(NULL),
in_handshake_(false),
filter_(NULL) { }
@@ -76,12 +78,15 @@ class SSLFilter {
void Destroy();
void Handshake();
void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete);
+ void RegisterBadCertificateCallback(Dart_Handle callback);
static void InitializeLibrary(const char* certificate_database,
const char* password,
bool use_builtin_root_certificates);
intptr_t ProcessBuffer(int bufferIndex);
+ SECStatus HandleBadCertificate(PRFileDesc* fd);
+
private:
static const int kMemioBufferSize = 20 * KB;
static bool library_initialized_;
@@ -94,6 +99,7 @@ class SSLFilter {
Dart_Handle string_length_;
Dart_Handle dart_buffer_objects_[kNumBuffers];
Dart_Handle handshake_complete_;
+ Dart_Handle bad_certificate_callback_;
bool in_handshake_;
bool is_server_;
PRFileDesc* filter_;
« 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