X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=ustream-openssl.h;h=afff22b1a65c1c14325b876fbe3e8261eeda0943;hb=e8a14691313d72bac27f9060bc536cf2ad23256b;hp=20c502d3fb35f2cb2f8f96a961404f9cba9372f9;hpb=ba34903f4163d0650118bee76f012de961951409;p=project%2Fustream-ssl.git diff --git a/ustream-openssl.h b/ustream-openssl.h index 20c502d..afff22b 100644 --- a/ustream-openssl.h +++ b/ustream-openssl.h @@ -23,17 +23,13 @@ #include #include +void __ustream_ssl_session_free(void *ssl); + static inline void *__ustream_ssl_session_new(void *ctx) { return SSL_new(ctx); } -static inline void __ustream_ssl_session_free(void *ssl) -{ - SSL_shutdown(ssl); - SSL_free(ssl); -} - static inline char *__ustream_ssl_strerror(int error, char *buffer, int len) { return ERR_error_string(error, buffer); @@ -43,4 +39,9 @@ static inline void __ustream_ssl_update_peer_cn(struct ustream_ssl *us) { } +static inline void __ustream_ssl_set_server_name(struct ustream_ssl *us) +{ + SSL_set_tlsext_host_name(us->ssl, us->server_name); +} + #endif