This patch is needed for EVP+AES

--- crypto/evp/e_aes.c  Sat Feb 16 13:39:53 2002
+++ crypto/evp/e_aes.c  Sun Feb 24 16:54:59 2002
@@ -88,6 +88,8 @@
 static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
                   const unsigned char *iv, int enc) {
 
+       if (enc == -1)
+               enc = ctx->encrypt;
        if (enc) 
                AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data);
        else


otherwise code similar to this will break:

        EVP_CIPHER_CTX c;

        EVP_CIPHER_CTX_init(&c);
        EVP_CipherInit(&c, cipher, NULL, iv, enc);
        /* adjust keylength */
        EVP_CIPHER_CTX_set_key_length(&c, keylen)
        EVP_CipherInit(&c, NULL, key, NULL, -1);

There could be problems in other ciphers, too.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to