From: Steffan Karger Date: Sun, 19 May 2013 08:01:29 +0000 (+0200) Subject: Do not pass struct tls_session* as void* in key_state_ssl_init(). X-Git-Tag: v2.4_alpha1~554 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b97e2c3c90afdbb1a24bc1357ec6b94d626defcd;p=thirdparty%2Fopenvpn.git Do not pass struct tls_session* as void* in key_state_ssl_init(). Signed-off-by: Steffan Karger Acked-by: David Sommerseth Message-Id: 51B1DBEF.1090705@fox-it.com URL: http://article.gmane.org/gmane.network.openvpn.devel/7664 Signed-off-by: David Sommerseth --- diff --git a/src/openvpn/ssl_backend.h b/src/openvpn/ssl_backend.h index f61580cfc..72235ae5b 100644 --- a/src/openvpn/ssl_backend.h +++ b/src/openvpn/ssl_backend.h @@ -42,6 +42,10 @@ #include "ssl_verify_polarssl.h" #endif +/** + * prototype for struct tls_session from ssl_common.h + */ +struct tls_session; /** * Get a tls_cipher_name_pair containing OpenSSL and IANA names for supplied TLS cipher name @@ -291,7 +295,7 @@ void tls_ctx_personalise_random(struct tls_root_ctx *ctx); * @param session The session associated with the given key_state */ void key_state_ssl_init(struct key_state_ssl *ks_ssl, - const struct tls_root_ctx *ssl_ctx, bool is_server, void *session); + const struct tls_root_ctx *ssl_ctx, bool is_server, struct tls_session *session); /** * Free the SSL channel part of the given key state. diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index c1b19dc2e..2e5933d61 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -1015,7 +1015,7 @@ bio_read (BIO *bio, struct buffer *buf, int maxlen, const char *desc) } void -key_state_ssl_init(struct key_state_ssl *ks_ssl, const struct tls_root_ctx *ssl_ctx, bool is_server, void *session) +key_state_ssl_init(struct key_state_ssl *ks_ssl, const struct tls_root_ctx *ssl_ctx, bool is_server, struct tls_session *session) { ASSERT(NULL != ssl_ctx); ASSERT(ks_ssl); diff --git a/src/openvpn/ssl_polarssl.c b/src/openvpn/ssl_polarssl.c index 2b5b37ba8..a82b23338 100644 --- a/src/openvpn/ssl_polarssl.c +++ b/src/openvpn/ssl_polarssl.c @@ -502,7 +502,7 @@ void tls_ctx_personalise_random(struct tls_root_ctx *ctx) } void key_state_ssl_init(struct key_state_ssl *ks_ssl, - const struct tls_root_ctx *ssl_ctx, bool is_server, void *session) + const struct tls_root_ctx *ssl_ctx, bool is_server, struct tls_session *session) { ASSERT(NULL != ssl_ctx); ASSERT(ks_ssl);