10#include "wvfdstream.h"
12#include "wvstreamclone.h"
19typedef struct ssl_ctx_st SSL_CTX;
20typedef struct ssl_st SSL;
21typedef struct ssl_method_st SSL_METHOD;
27typedef wv::function<bool(
WvX509*)> WvSSLValidateCallback;
48 static WvSSLGlobalValidateCallback global_vcb;
55 WvSSLValidateCallback _vcb = 0,
bool _is_server =
false);
80 virtual size_t uwrite(
const void *buf,
size_t len);
81 virtual size_t uread(
void *buf,
size_t len);
92 void setconnected(
bool conn);
98 bool ssl_stop_read, ssl_stop_write;
101 WvSSLValidateCallback vcb;
128 const char *wstype()
const {
return "WvSSLStream"; }
A WvFastString acts exactly like a WvString, but can take (const char *) strings without needing to a...
The in place raw memory buffer type.
A WvLog stream accepts log messages from applications and forwards them to all registered WvLogRcv's.
SSL Stream, handles SSLv2, SSLv3, and TLS Methods - If you want it to be a server,...
SSL * ssl
Main SSL Object - after SSL_set_fd() we make all calls through the connection through here.
virtual size_t uwrite(const void *buf, size_t len)
unbuffered I/O functions; these ignore the buffer, which is handled by write().
virtual bool isok() const
return true if the stream is actually usable right now
virtual void noread()
Shuts down the reading side of the stream.
virtual size_t uread(void *buf, size_t len)
unbuffered I/O functions; these ignore the buffer, which is handled by read().
virtual void close()
Close this stream.
virtual void nowrite()
Shuts down the writing side of the stream.
SSL_CTX * ctx
SSL Context - used to create SSL Object.
WvSSLStream(IWvStream *_slave, WvX509Mgr *_x509=NULL, WvSSLValidateCallback _vcb=0, bool _is_server=false)
Start an SSL connection on the stream _slave.
virtual ~WvSSLStream()
Cleans up everything (calls close + frees up the SSL Objects used)
virtual bool post_select(SelectInfo &si)
post_select() is called after select(), and returns true if this object is now ready.
virtual void pre_select(SelectInfo &si)
pre_select() sets up for eventually calling select().
WvStreamClone simply forwards all requests to the "cloned" stream.
X509 Class to handle certificates and their related functions.
the data structure used by pre_select()/post_select() and internally by select().
A SelectRequest is a convenient way to remember what we want to do to a particular stream: read from ...