This patch is to remove compilation error while using old openssl

MAYANK HAARIT mayank.h
Tue Jun 2 22:39:34 PDT 2015


Instead of passing extra "conn" variable , We can use existing variable "ssl" .
Kinldy ignore my previous patch for this issue and use this one instead.

Signed-off-by: Mayank Haarit <mayank.h at samsung.com>
---
 src/crypto/tls_openssl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index 5d4795a..db3bc5b 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -2687,7 +2687,7 @@ static int openssl_get_keyblock_size(SSL *ssl)
 #if OPENSSL_VERSION_NUMBER >= 0x00909000L
 	h = EVP_MD_CTX_md(ssl->read_hash);
 #else
-	h = conn->ssl->read_hash;
+	h = ssl->read_hash;
 #endif
 	if (h)
 		md_size = EVP_MD_size(h);
-- 
1.7.0.4



------- Original Message -------
Sender : MAYANK HAARIT<mayank.h at samsung.com> Chief Engineer/SRI-Delhi-Advanced SW Team/Samsung Electronics
Date : Jun 02, 2015 15:29 (GMT+09:00)
Title : This patch is to remove compilation error while using old openssl

This will handle compilation error for the case of
OPENSSL_VERSION_NUMBER < 0x00909000L

Signed-off-by: Mayank Haarit 
---
src/crypto/tls_openssl.c |    4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index 5d4795a..78478e5 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -2673,7 +2673,7 @@ int tls_connection_get_keys(void *ssl_ctx, struct tls_connection *conn,
}


-static int openssl_get_keyblock_size(SSL *ssl)
+static int openssl_get_keyblock_size(SSL *ssl, struct tls_connection *conn)
{
const EVP_CIPHER *c;
const EVP_MD *h;
@@ -2737,7 +2737,7 @@ static int openssl_tls_prf(void *tls_ctx, struct tls_connection *conn,
return -1;

if (skip_keyblock) {
- skip = openssl_get_keyblock_size(ssl);
+ skip = openssl_get_keyblock_size(ssl,conn);
if (skip < 0)
return -1;
tmp_out = os_malloc(skip + out_len);
-- 
1.7.0.4

_______________________________________________
HostAP mailing list
HostAP at lists.shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap



More information about the Hostap mailing list