libevent
2.2.1
Event notification library
|
Go to the documentation of this file.
26 #ifndef EVENT2_BUFFEREVENT_SSL_H_INCLUDED_
27 #define EVENT2_BUFFEREVENT_SSL_H_INCLUDED_
33 #include <event2/visibility.h>
34 #include <event2/event-config.h>
47 BUFFEREVENT_SSL_OPEN = 0,
48 BUFFEREVENT_SSL_CONNECTING = 1,
49 BUFFEREVENT_SSL_ACCEPTING = 2
67 #define BUFFEREVENT_SSL_DIRTY_SHUTDOWN 1
79 #define BUFFEREVENT_SSL_BATCH_WRITE 2
81 #if defined(EVENT__HAVE_OPENSSL) || defined(EVENT__HAVE_MBEDTLS)
89 ev_uint64_t bufferevent_ssl_get_flags(
struct bufferevent *bev);
97 ev_uint64_t bufferevent_ssl_set_flags(
struct bufferevent *bev, ev_uint64_t flags);
105 ev_uint64_t bufferevent_ssl_clear_flags(
struct bufferevent *bev, ev_uint64_t flags);
109 #if defined(EVENT__HAVE_OPENSSL) || defined(EVENT_IN_DOXYGEN_)
168 int allow_dirty_shutdown);
184 #if defined(EVENT__HAVE_MBEDTLS) || defined(EVENT_IN_DOXYGEN_)
185 struct mbedtls_ssl_context;
186 struct mbedtls_ssl_config;
187 typedef struct mbedtls_ssl_context mbedtls_dyncontext;
204 mbedtls_dyncontext *ssl,
222 mbedtls_dyncontext *ssl,
244 int allow_dirty_shutdown);
248 struct mbedtls_ssl_context *
EVENT2_EXPORT_SYMBOL struct mbedtls_ssl_context * bufferevent_mbedtls_get_ssl(struct bufferevent *bufev)
Return the underlying mbedtls SSL * object for an SSL bufferevent.
EVENT2_EXPORT_SYMBOL int bufferevent_openssl_get_allow_dirty_shutdown(struct bufferevent *bev)
Get value of the BUFFEREVENT_SSL_DIRTY_SHUTDOWN flag.
EVENT2_EXPORT_SYMBOL unsigned long bufferevent_get_mbedtls_error(struct bufferevent *bev)
Return the most recent MbedTLS error reported on an SSL bufferevent.
EVENT2_EXPORT_SYMBOL int bufferevent_mbedtls_get_allow_dirty_shutdown(struct bufferevent *bev)
Get value of the BUFFEREVENT_SSL_DIRTY_SHUTDOWN flag.
bufferevent_ssl_state
The state of an SSL object to be used when creating a new SSL bufferevent.
Definition: bufferevent_ssl.h:46
Structure to hold information and state for a Libevent dispatch loop.
Definition: event.h:219
EVENT2_EXPORT_SYMBOL void bufferevent_mbedtls_dyncontext_free(mbedtls_dyncontext *ctx)
Deallocate heap-based MbedTLS context.
EVENT2_EXPORT_SYMBOL struct bufferevent * bufferevent_openssl_filter_new(struct event_base *base, struct bufferevent *underlying, struct ssl_st *ssl, enum bufferevent_ssl_state state, int options)
Create a new SSL bufferevent to send its data over another bufferevent.
An opaque type for handling buffered IO.
Definition: bufferevent.h:114
EVENT2_EXPORT_SYMBOL int bufferevent_ssl_renegotiate(struct bufferevent *bev)
Tells a bufferevent to begin SSL renegotiation.
EVENT2_EXPORT_SYMBOL struct bufferevent * bufferevent_mbedtls_filter_new(struct event_base *base, struct bufferevent *underlying, mbedtls_dyncontext *ssl, enum bufferevent_ssl_state state, int options)
Create a new SSL bufferevent to send its data over another bufferevent.
EVENT2_EXPORT_SYMBOL struct bufferevent * bufferevent_openssl_socket_new(struct event_base *base, evutil_socket_t fd, struct ssl_st *ssl, enum bufferevent_ssl_state state, int options)
Create a new SSL bufferevent to send its data over an SSL * on a socket.
EVENT2_EXPORT_SYMBOL struct bufferevent * bufferevent_mbedtls_socket_new(struct event_base *base, evutil_socket_t fd, mbedtls_dyncontext *ssl, enum bufferevent_ssl_state state, int options)
Create a new SSL bufferevent to send its data over an SSL * on a socket.
EVENT2_EXPORT_SYMBOL void bufferevent_mbedtls_set_allow_dirty_shutdown(struct bufferevent *bev, int allow_dirty_shutdown)
Set value of the BUFFEREVENT_SSL_DIRTY_SHUTDOWN flag.
Functions for buffering data for network sending or receiving.
EVENT2_EXPORT_SYMBOL void bufferevent_openssl_set_allow_dirty_shutdown(struct bufferevent *bev, int allow_dirty_shutdown)
Set value of the BUFFEREVENT_SSL_DIRTY_SHUTDOWN flag.
EVENT2_EXPORT_SYMBOL int bufferevent_mbedtls_renegotiate(struct bufferevent *bev)
Tells a bufferevent to begin SSL renegotiation.
Common convenience functions for cross-platform portability and related socket manipulations.
EVENT2_EXPORT_SYMBOL mbedtls_dyncontext * bufferevent_mbedtls_dyncontext_new(struct mbedtls_ssl_config *conf)
Create a new heap-based MbedTLS context for use it in bufferevent_mbedtls_* functions.
EVENT2_EXPORT_SYMBOL unsigned long bufferevent_get_openssl_error(struct bufferevent *bev)
Return the most recent OpenSSL error reported on an SSL bufferevent.
EVENT2_EXPORT_SYMBOL struct ssl_st * bufferevent_openssl_get_ssl(struct bufferevent *bufev)
Return the underlying openssl SSL * object for an SSL bufferevent.
#define evutil_socket_t
A type wide enough to hold the output of "socket()" or "accept()".
Definition: util.h:325