29 #include <openssl/ssl.h>
42 class TLSStream :
public std::basic_streambuf<char, std::char_traits<char> >,
public std::iostream
44 static const std::string TAG;
47 typedef std::char_traits<char>
traits;
78 static void init(X509 *certificate, EVP_PKEY *privateKey,
ibrcommon::File trustedCAPath,
bool enableEncryption =
false);
108 virtual traits::int_type
overflow(traits::int_type = traits::eof());
112 std::string log_error_msg(
int errnumber);
114 static bool _initialized;
116 static bool _SSL_initialized;
123 std::vector<char> in_buf_;
125 std::vector<char> out_buf_;
127 std::iostream *_stream;
131 static SSL_CTX *_ssl_ctx;