Rename key_length in cipher_info
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 48dfd04..f14c9dd 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -677,7 +677,7 @@
      * Determine the appropriate key, IV and MAC length.
      */
 
-    transform->keylen = cipher_info->key_length / 8;
+    transform->keylen = cipher_info->key_bitlen / 8;
 
     if( cipher_info->mode == MBEDTLS_MODE_GCM ||
         cipher_info->mode == MBEDTLS_MODE_CCM )
@@ -880,7 +880,7 @@
     }
 
     if( ( ret = mbedtls_cipher_setkey( &transform->cipher_ctx_enc, key1,
-                               cipher_info->key_length,
+                               cipher_info->key_bitlen,
                                MBEDTLS_ENCRYPT ) ) != 0 )
     {
         MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_setkey", ret );
@@ -888,7 +888,7 @@
     }
 
     if( ( ret = mbedtls_cipher_setkey( &transform->cipher_ctx_dec, key2,
-                               cipher_info->key_length,
+                               cipher_info->key_bitlen,
                                MBEDTLS_DECRYPT ) ) != 0 )
     {
         MBEDTLS_SSL_DEBUG_RET( 1, "mbedtls_cipher_setkey", ret );