]> granicus.if.org Git - openssl/commitdiff
EVP_CIPHER_CTX_key_length() should return the set key length in the
authorDr. Stephen Henson <steve@openssl.org>
Tue, 27 Feb 2007 18:42:52 +0000 (18:42 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 27 Feb 2007 18:42:52 +0000 (18:42 +0000)
EVP_CIPHER_CTX structure which may not be the same as the underlying
cipher key length for variable length ciphers.

crypto/evp/evp_lib.c

index f92db23af64953f426bd3503142c9ecb486482e1..edb28ef38ed7b44ae6cb9c26f1b7aa3c3aa989ff 100644 (file)
@@ -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)