ustream-openssl: fix compilation with OPENSSL_NO_DEPRECATED
[project/ustream-ssl.git] / ustream-mbedtls.h
index a48986771c0993b9a11890a7341beb47355435e6..281b9195abc9e37034c234e5a24e64ef04ef553f 100644 (file)
 #ifndef __USTREAM_POLARSSL_H
 #define __USTREAM_POLARSSL_H
 
-#include <mbedtls/net.h>
+#include <mbedtls/net_sockets.h>
 #include <mbedtls/ssl.h>
-#include <mbedtls/certs.h>
 #include <mbedtls/x509.h>
 #include <mbedtls/rsa.h>
 #include <mbedtls/error.h>
 #include <mbedtls/version.h>
 #include <mbedtls/entropy.h>
 
+#if defined(MBEDTLS_SSL_CACHE_C)
+#include <mbedtls/ssl_cache.h>
+#endif
+
 struct ustream_ssl_ctx {
        mbedtls_ssl_config conf;
        mbedtls_pk_context key;
        mbedtls_x509_crt ca_cert;
        mbedtls_x509_crt cert;
+#if defined(MBEDTLS_SSL_CACHE_C)
+       mbedtls_ssl_cache_context cache;
+#endif
+       ustream_ssl_debug_cb debug_cb;
+       void *debug_cb_priv;
        bool server;
+       int *ciphersuites;
+
+       void *session_data;
+       size_t session_data_len;
 };
 
 static inline char *__ustream_ssl_strerror(int error, char *buffer, int len)
@@ -52,7 +64,6 @@ static inline void __ustream_ssl_update_peer_cn(struct ustream_ssl *us)
        mbedtls_ssl_set_hostname(us->ssl, us->peer_cn);
 }
 
-void __ustream_ssl_session_free(void *ssl);
 void *__ustream_ssl_session_new(struct ustream_ssl_ctx *ctx);
 
 #endif