| Index: net/socket/ssl_client_socket_openssl.h
|
| diff --git a/net/socket/ssl_client_socket_openssl.h b/net/socket/ssl_client_socket_openssl.h
|
| index 12db7246b3b137fdf5e93a7b38ec51d789db0853..645aaf41899059900a19bf58088b2a288623ec4f 100644
|
| --- a/net/socket/ssl_client_socket_openssl.h
|
| +++ b/net/socket/ssl_client_socket_openssl.h
|
| @@ -5,7 +5,11 @@
|
| #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
|
| #define NET_SOCKET_SSL_CLIENT_SOCKET_OPENSSL_H_
|
|
|
| +#include <openssl/base.h>
|
| +#include <openssl/ssl.h>
|
| +
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "base/compiler_specific.h"
|
| #include "base/memory/scoped_ptr.h"
|
| @@ -23,25 +27,13 @@
|
| #include "net/ssl/ssl_config_service.h"
|
| #include "net/ssl/ssl_failure_state.h"
|
|
|
| -// Avoid including misc OpenSSL headers, i.e.:
|
| -// <openssl/bio.h>
|
| -typedef struct bio_st BIO;
|
| -// <openssl/evp.h>
|
| -typedef struct evp_pkey_st EVP_PKEY;
|
| -// <openssl/ssl.h>
|
| -typedef struct ssl_session_st SSL_SESSION;
|
| -typedef struct ssl_st SSL;
|
| -// <openssl/x509.h>
|
| -typedef struct x509_st X509;
|
| -// <openssl/ossl_type.h>
|
| -typedef struct x509_store_ctx_st X509_STORE_CTX;
|
| -
|
| namespace net {
|
|
|
| class CertVerifier;
|
| class CTVerifier;
|
| class SSLCertRequestInfo;
|
| class SSLInfo;
|
| +class SSLPrivateKey;
|
|
|
| // An SSL client socket implemented with OpenSSL.
|
| class SSLClientSocketOpenSSL : public SSLClientSocket {
|
| @@ -133,6 +125,11 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
|
| int DoPayloadRead();
|
| int DoPayloadWrite();
|
|
|
| + // Called when an asynchronous event completes which may have blocked the
|
| + // pending Read or Write calls, if any. Retries both state machines and, if
|
| + // complete, runs the respective callbacks.
|
| + void PumpReadWriteEvents();
|
| +
|
| int BufferSend();
|
| int BufferRecv();
|
| void BufferSendComplete(int result);
|
| @@ -192,6 +189,23 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
|
| // Returns true if renegotiations are allowed.
|
| bool IsRenegotiationAllowed() const;
|
|
|
| + // Callbacks for operations with the private key.
|
| + int PrivateKeyTypeCallback();
|
| + int PrivateKeySupportsDigestCallback(const EVP_MD* md);
|
| + size_t PrivateKeyMaxSignatureLenCallback();
|
| + ssl_private_key_result_t PrivateKeySignCallback(uint8_t* out,
|
| + size_t* out_len,
|
| + size_t max_out,
|
| + const EVP_MD* md,
|
| + const uint8_t* in,
|
| + size_t in_len);
|
| + ssl_private_key_result_t PrivateKeySignCompleteCallback(uint8_t* out,
|
| + size_t* out_len,
|
| + size_t max_out);
|
| +
|
| + void OnPrivateKeySignComplete(Error error,
|
| + const std::vector<uint8_t>& signature);
|
| +
|
| bool transport_send_busy_;
|
| bool transport_recv_busy_;
|
|
|
| @@ -302,6 +316,10 @@ class SSLClientSocketOpenSSL : public SSLClientSocket {
|
| ChannelIDService::Request channel_id_request_;
|
| SSLFailureState ssl_failure_state_;
|
|
|
| + scoped_ptr<SSLPrivateKey> private_key_;
|
| + int signature_result_;
|
| + std::vector<uint8_t> signature_;
|
| +
|
| TransportSecurityState* transport_security_state_;
|
|
|
| CertPolicyEnforcer* const policy_enforcer_;
|
|
|