1 #ifndef __USTREAM_SSL_H
2 #define __USTREAM_SSL_H
7 struct uloop_timeout error_timer
;
9 void (*notify_connected
)(struct ustream_ssl
*us
);
10 void (*notify_error
)(struct ustream_ssl
*us
, int error
, const char *str
);
20 struct ustream_ssl_ops
{
21 void *(*context_new
)(bool server
);
22 int (*context_set_crt_file
)(void *ctx
, const char *file
);
23 int (*context_set_key_file
)(void *ctx
, const char *file
);
24 void (*context_free
)(void *ctx
);
26 int (*init
)(struct ustream_ssl
*us
, struct ustream
*conn
, void *ctx
, bool server
);
29 extern const struct ustream_ssl_ops ustream_ssl_ops
;
31 #define ustream_ssl_context_new ustream_ssl_ops.context_new
32 #define ustream_ssl_context_set_crt_file ustream_ssl_ops.context_set_crt_file
33 #define ustream_ssl_context_set_key_file ustream_ssl_ops.context_set_key_file
34 #define ustream_ssl_context_free ustream_ssl_ops.context_free
35 #define ustream_ssl_init ustream_ssl_ops.init