5#ifndef RUNTIME_BIN_SECURE_SOCKET_FILTER_H_
6#define RUNTIME_BIN_SECURE_SOCKET_FILTER_H_
8#include <openssl/bio.h>
9#include <openssl/ssl.h>
10#include <openssl/x509.h>
31 const X509*
x509()
const {
return x509_; }
62 socket_side_(nullptr),
63 string_start_(nullptr),
64 string_length_(nullptr),
65 handshake_complete_(nullptr),
66 bad_certificate_callback_(nullptr),
80 bool request_client_certificate,
81 bool require_client_certificate,
115 return certificate_trust_state_.get();
119 return trust_evaluate_reply_port_;
123 static const intptr_t kInternalBIOSize;
124 static bool library_initialized_;
125 static Mutex* mutex_;
131 std::unique_ptr<X509TrustState> certificate_trust_state_;
135 int encrypted_buffer_size_;
149 static bool IsBufferEncrypted(
int i) {
153 void InitializePlatformData();
void Connect(const char *hostname, SSLCertContext *context, bool is_server, bool request_client_certificate, bool require_client_certificate, Dart_Handle protocols_handle)
int ProcessReadEncryptedBuffer(int start, int end)
void RegisterHandshakeCompleteCallback(Dart_Handle handshake_complete)
void RegisterKeyLogPort(Dart_Port key_log_port)
int ProcessWritePlaintextBuffer(int start, int end)
void MarkAsTrusted(Dart_NativeArguments args)
Dart_Handle PeerCertificate()
void RegisterBadCertificateCallback(Dart_Handle callback)
static void InitializeLibrary()
void GetSelectedProtocol(Dart_NativeArguments args)
Dart_Handle bad_certificate_callback()
bool ProcessAllBuffers(int starts[kNumBuffers], int ends[kNumBuffers], bool in_handshake)
static CObject * ProcessFilterRequest(const CObjectArray &request)
int Handshake(Dart_Port reply_port)
static int ssl_cert_context_index
static const intptr_t kApproximateSize
Dart_Port trust_evaluate_reply_port() const
Dart_Handle callback_error
static int filter_ssl_index
static constexpr int kSSLFilterNativeFieldIndex
int ProcessReadPlaintextBuffer(int start, int end)
int ProcessWriteEncryptedBuffer(int start, int end)
Dart_Port reply_port() const
const X509TrustState * certificate_trust_state()
X509TrustState(const X509 *x509, bool is_trusted)
const X509 * x509() const
struct _Dart_Handle * Dart_Handle
struct _Dart_NativeArguments * Dart_NativeArguments
Dart_Handle Dart_PersistentHandle
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
const unsigned char * root_certificates_pem
unsigned int root_certificates_pem_length
DART_EXPORT Dart_Handle Dart_HandleFromPersistent(Dart_PersistentHandle object)