diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-05-26 23:51:35 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-05-26 23:51:35 +0000 |
commit | 7f0606016cbbec917b1fe094b84b062e87abe7da (patch) | |
tree | 7238920f63ab28f7babc823ca9e8f18903e25192 /crypto/evp/e_ecb_c.c | |
parent | 7b224903f4d4e2c74d1548b6f0ca8b0ba31113ad (diff) | |
download | openssl-7f0606016cbbec917b1fe094b84b062e87abe7da.tar.gz |
Beginnings of EVP cipher overhaul. This should eventually
enhance and tidy up the EVP interface.
This patch adds initial support for variable length ciphers
and changes S/MIME code to use this.
Some other library functions need modifying to support use
of modified cipher parameters.
Also need to change all the cipher functions that should
return error codes, but currenly don't.
And of course it needs extensive testing...
Diffstat (limited to 'crypto/evp/e_ecb_c.c')
-rw-r--r-- | crypto/evp/e_ecb_c.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/evp/e_ecb_c.c b/crypto/evp/e_ecb_c.c index ad14e203cb..7eafb8d9b2 100644 --- a/crypto/evp/e_ecb_c.c +++ b/crypto/evp/e_ecb_c.c @@ -71,6 +71,7 @@ static EVP_CIPHER cast5_ecb_cipher= { NID_cast5_ecb, 8,EVP_CAST5_KEY_SIZE,0, + EVP_CIPH_ECB_MODE | EVP_CIPH_VARIABLE_LENGTH, cast_ecb_init_key, cast_ecb_cipher, NULL, @@ -78,6 +79,7 @@ static EVP_CIPHER cast5_ecb_cipher= sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), NULL, NULL, + NULL }; EVP_CIPHER *EVP_cast5_ecb(void) @@ -89,7 +91,7 @@ static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, unsigned char *iv, int enc) { if (key != NULL) - CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); + CAST_set_key(&(ctx->c.cast_ks),EVP_CIPHER_CTX_key_length(ctx),key); } static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, |