ustream-ssl: add support for using a fd instead of ustream as backing
[project/ustream-ssl.git] / ustream-openssl.h
index 90acc864ddfac72f37a3d2eb84edadf2e0b49193..847f5aa64bff547e2bca19d04b35e7c544904c40 100644 (file)
 
 #include <stdbool.h>
 
-void __ustream_ssl_session_free(void *ssl);
+struct ustream_ssl_ctx {
+       SSL_CTX *ssl;
+       BIO *debug_bio;
+       ustream_ssl_debug_cb debug_cb;
+       void *debug_cb_priv;
+};
 
 struct bio_ctx {
        BIO_METHOD *meth;
        struct ustream *stream;
 };
 
-static inline void *__ustream_ssl_session_new(void *ctx)
+static inline void *__ustream_ssl_session_new(struct ustream_ssl_ctx *ctx)
 {
-       return SSL_new(ctx);
+       return SSL_new(ctx->ssl);
 }
 
 static inline char *__ustream_ssl_strerror(int error, char *buffer, int len)