X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fustream-ssl.git;a=blobdiff_plain;f=ustream-internal.h;h=85d8b47d2584fda97e5b7bb972005c983e8c8c8d;hp=40f1d4e12b7c218d9b805d62340a2e314cb38e71;hb=5bdc435399643c5526aafbeddc1dd905dffe4399;hpb=f48abdecd43435809777629e20a257448a68a578 diff --git a/ustream-internal.h b/ustream-internal.h index 40f1d4e..85d8b47 100644 --- a/ustream-internal.h +++ b/ustream-internal.h @@ -21,7 +21,11 @@ #define __hidden __attribute__((visibility("hidden"))) +#ifdef HAVE_POLARSSL +#include "ustream-polarssl.h" +#else #include "ustream-openssl.h" +#endif enum ssl_conn_status { U_SSL_OK = 0, @@ -29,11 +33,11 @@ enum ssl_conn_status { U_SSL_ERROR = -2, }; -void ustream_set_io(void *ctx, void *ssl, struct ustream *s); -void *__ustream_ssl_context_new(bool server); -int __ustream_ssl_set_crt_file(void *ctx, const char *file); -int __ustream_ssl_set_key_file(void *ctx, const char *file); -void __ustream_ssl_context_free(void *ctx); +void ustream_set_io(struct ustream_ssl_ctx *ctx, void *ssl, struct ustream *s); +struct ustream_ssl_ctx *__ustream_ssl_context_new(bool server); +int __ustream_ssl_set_crt_file(struct ustream_ssl_ctx *ctx, const char *file); +int __ustream_ssl_set_key_file(struct ustream_ssl_ctx *ctx, const char *file); +void __ustream_ssl_context_free(struct ustream_ssl_ctx *ctx); enum ssl_conn_status __ustream_ssl_connect(struct ustream_ssl *us); int __ustream_ssl_read(struct ustream_ssl *us, char *buf, int len); int __ustream_ssl_write(struct ustream_ssl *us, const char *buf, int len);