27#include <openssl/ssl.h>
28#include <openssl/x509.h>
47 PeerRejectedCertificate,
114 static std::unique_ptr<TlsConnection>
Create(
Role role, std::string_view cert,
115 std::string_view priv_key,
120 static bool SetCertAndKey(SSL* ssl, std::string_view cert_chain, std::string_view priv_key);
Definition: tls_connection.h:33
static bool SetCertAndKey(SSL *ssl, std::string_view cert_chain, std::string_view priv_key)
Definition: tls_connection.cpp:373
virtual void EnableClientPostHandshakeCheck(bool enable)=0
virtual void SetCertVerifyCallback(CertVerifyCb cb)=0
virtual void SetCertificateCallback(SetCertCb cb)=0
std::function< int(SSL *)> SetCertCb
Definition: tls_connection.h:53
virtual std::vector< uint8_t > ExportKeyingMaterial(size_t length)=0
TlsError
Definition: tls_connection.h:42
virtual bool WriteFully(std::string_view data)=0
virtual std::vector< uint8_t > ReadFully(size_t size)=0
static std::unique_ptr< TlsConnection > Create(Role role, std::string_view cert, std::string_view priv_key, android::base::borrowed_fd fd)
Definition: tls_connection.cpp:363
virtual ~TlsConnection()=default
Role
Definition: tls_connection.h:37
std::function< int(X509_STORE_CTX *)> CertVerifyCb
Definition: tls_connection.h:52
virtual bool ReadFully(void *buf, size_t size)=0
virtual bool AddTrustedCertificate(std::string_view cert)=0
virtual TlsError DoHandshake()=0
virtual void SetClientCAList(STACK_OF(X509_NAME) *ca_list)=0
char data[Size]
Definition: incremental_server.cpp:1
uint32_t size
Definition: io.h:2
Definition: unique_fd.h:292