diff options
| author | markus <> | 2002-09-05 12:51:50 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:50 +0000 |
| commit | 15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch) | |
| tree | bf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/evp/e_aes.c | |
| parent | 027351f729b9e837200dae6e1520cda6577ab930 (diff) | |
| download | openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2 openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip | |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/evp/e_aes.c')
| -rw-r--r-- | src/lib/libcrypto/evp/e_aes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index 9d03a9602f..c323fa2892 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
| @@ -88,7 +88,9 @@ IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY, | |||
| 88 | static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 88 | static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 89 | const unsigned char *iv, int enc) { | 89 | const unsigned char *iv, int enc) { |
| 90 | 90 | ||
| 91 | if (enc) | 91 | if ((ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_CFB_MODE |
| 92 | || (ctx->cipher->flags & EVP_CIPH_MODE) == EVP_CIPH_OFB_MODE | ||
| 93 | || enc) | ||
| 92 | AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data); | 94 | AES_set_encrypt_key(key, ctx->key_len * 8, ctx->cipher_data); |
| 93 | else | 95 | else |
| 94 | AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data); | 96 | AES_set_decrypt_key(key, ctx->key_len * 8, ctx->cipher_data); |
