Remove compression field from SSL session if compression disabled
diff --git a/library/ssl_cache.c b/library/ssl_cache.c
index bcc2f59..90e2a81 100644
--- a/library/ssl_cache.c
+++ b/library/ssl_cache.c
@@ -86,7 +86,8 @@
if( mbedtls_ssl_session_get_ciphersuite( session ) !=
mbedtls_ssl_session_get_ciphersuite( &entry->session ) ||
- session->compression != entry->session.compression ||
+ mbedtls_ssl_session_get_compression( session ) !=
+ mbedtls_ssl_session_get_compression( &entry->session ) ||
session->id_len != entry->session.id_len )
{
continue;