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);
64 virtual bool isok()
const;
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;
122 WvDynBuf unconnected_buf;
125 void printerr(WvStringParm func);
128 const char *wstype()
const {
return "WvSSLStream"; }
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,...
virtual void close()
Close this stream.
SSL * ssl
Main SSL Object - after SSL_set_fd() we make all calls through the connection through here.
virtual bool isok() const
return true if the stream is actually usable right now
virtual size_t uwrite(const void *buf, size_t len)
unbuffered I/O functions; these ignore the buffer, which is handled by write().
virtual ~WvSSLStream()
Cleans up everything (calls close + frees up the SSL Objects used).
virtual void pre_select(SelectInfo &si)
pre_select() sets up for eventually calling select().
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 size_t uread(void *buf, size_t len)
unbuffered I/O functions; these ignore the buffer, which is handled by read().
virtual void noread()
Shuts down the reading side of the stream.
virtual bool post_select(SelectInfo &si)
post_select() is called after select(), and returns true if this object is now ready.
WvStreamClone(IWvStream *_cloned=NULL)
Constructs the stream, then calls setclone(_cloned).
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 ...