From 8e9898839e1cab4cb5affa37125bb12602040d78 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 15 Mar 2007 20:26:26 +0000 Subject: Import fix from upstream OpenSSL_0_9_8-stable branch: EVP_CIPHER_CTX_key_length() should return the set key length in the EVP_CIPHER_CTX structure which may not be the same as the underlying cipher key length for variable length ciphers. This fixes problems in OpenSSH using some ciphers, and possibly other applications. See also: http://bugzilla.mindrot.org/show_bug.cgi?id=1291 --- crypto/openssl/crypto/evp/evp_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto') diff --git a/crypto/openssl/crypto/evp/evp_lib.c b/crypto/openssl/crypto/evp/evp_lib.c index f92db23..edb28ef 100644 --- a/crypto/openssl/crypto/evp/evp_lib.c +++ b/crypto/openssl/crypto/evp/evp_lib.c @@ -225,7 +225,7 @@ int EVP_CIPHER_key_length(const EVP_CIPHER *cipher) int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) { - return ctx->cipher->key_len; + return ctx->key_len; } int EVP_CIPHER_nid(const EVP_CIPHER *cipher) -- cgit v1.1