From 6d0a2c03c31ce8b0fbb47857f774846514da1c3b Mon Sep 17 00:00:00 2001 From: cameronrich Date: Tue, 5 Jul 2016 20:07:17 +0000 Subject: [PATCH] Fixed some skeleton mode warnings git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@257 9a5d90b5-6617-0410-8a86-bb477d3ed2e3 --- ssl/openssl.c | 8 +++++--- ssl/tls1.c | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ssl/openssl.c b/ssl/openssl.c index 52c3a4967..3518a7081 100644 --- a/ssl/openssl.c +++ b/ssl/openssl.c @@ -79,12 +79,14 @@ void SSL_CTX_free(SSL_CTX * ssl_ctx) SSL * SSL_new(SSL_CTX *ssl_ctx) { SSL *ssl; - ssl_func_type_t ssl_func_type; +#ifdef CONFIG_SSL_ENABLE_CLIENT + ssl_func_type_t ssl_func_type = OPENSSL_CTX_ATTR->ssl_func_type; +#endif ssl = ssl_new(ssl_ctx, -1); /* fd is set later */ - ssl_func_type = OPENSSL_CTX_ATTR->ssl_func_type; - #ifdef CONFIG_SSL_ENABLE_CLIENT + ssl_func_type + if (ssl_func_type == SSLv3_client_method || ssl_func_type == TLSv1_client_method) { diff --git a/ssl/tls1.c b/ssl/tls1.c index 1004e5bc8..55a3bae8b 100644 --- a/ssl/tls1.c +++ b/ssl/tls1.c @@ -59,7 +59,9 @@ static int increase_bm_data_size(SSL *ssl, size_t size); * The server will pick the cipher based on the order that the order that the * ciphers are listed. This order is defined at compile time. */ +#ifndef CONFIG_SSL_SKELETON_MODE static void session_free(SSL_SESSION *ssl_sessions[], int sess_index); +#endif const uint8_t ssl_prot_prefs[NUM_PROTOCOLS] = #ifdef CONFIG_SSL_PROT_LOW /* same as medium for now */