15 #include "tlsopensslclient.h"
31 bool OpenSSLClient::setType()
33 m_ctx = SSL_CTX_new( SSLv23_client_method() );
37 SSL_CTX_set_options( m_ctx, SSL_OP_NO_SSLv3 );
50 if( SSL_version( m_ssl ) == TLS1_3_VERSION )
52 unsigned char buf[32];
53 const char*
const label =
"EXPORTER-Channel-Binding";
54 SSL_export_keying_material( m_ssl, buf, 32, label, strlen( label ), { 0 }, 1, 0 );
55 return std::string(
reinterpret_cast<char* const
>( buf ), 32 );
59 unsigned char* buf[128];
60 long res = SSL_get_finished( m_ssl, buf, 128 );
61 return std::string(
reinterpret_cast<char*
>( buf ), res );
67 if( SSL_version( m_ssl ) == TLS1_3_VERSION ) {
68 return "tls-exporter";
76 int OpenSSLClient::handshakeFunction()
78 return SSL_connect( m_ssl );
virtual const std::string channelBinding() const
virtual bool hasChannelBinding() const
virtual const std::string channelBindingType() const
OpenSSLClient(TLSHandler *th, const std::string &server)
An interface that allows for interacting with TLS implementations derived from TLSBase.
The namespace for the gloox library.