Rename key_length in cipher_info
diff --git a/library/pkcs12.c b/library/pkcs12.c
index 1baa95c..bdf6a9b 100644
--- a/library/pkcs12.c
+++ b/library/pkcs12.c
@@ -184,7 +184,7 @@
     if( cipher_info == NULL )
         return( MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE );
 
-    keylen = cipher_info->key_length / 8;
+    keylen = cipher_info->key_bitlen / 8;
 
     if( ( ret = pkcs12_pbe_derive_key_iv( pbe_params, md_type, pwd, pwdlen,
                                           key, keylen,