diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2000-05-27 12:38:43 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2000-05-27 12:38:43 +0000 |
commit | be06a9348d83187071270a29aabfe10cc3904f85 (patch) | |
tree | bd19112dbfbaa0b19bd83b1a94e85ad6a794fcdb /crypto/evp/e_cfb_d.c | |
parent | 7f0606016cbbec917b1fe094b84b062e87abe7da (diff) | |
download | openssl-be06a9348d83187071270a29aabfe10cc3904f85.tar.gz |
Second phase of EVP cipher overhaul.
Change functions like EVP_EncryptUpdate() so they now return a
value. These normally have software only implementations
which cannot fail so this was acceptable. However ciphers
can be implemented in hardware and these could return errors.
Diffstat (limited to 'crypto/evp/e_cfb_d.c')
-rw-r--r-- | crypto/evp/e_cfb_d.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/evp/e_cfb_d.c b/crypto/evp/e_cfb_d.c index 6817d78073..63d4dff681 100644 --- a/crypto/evp/e_cfb_d.c +++ b/crypto/evp/e_cfb_d.c @@ -62,9 +62,9 @@ #include <openssl/objects.h> #ifndef NO_DES -static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, +static int des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, unsigned char *iv,int enc); -static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, +static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *in, unsigned int inl); static EVP_CIPHER d_cfb_cipher= { @@ -86,7 +86,7 @@ EVP_CIPHER *EVP_des_cfb(void) return(&d_cfb_cipher); } -static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, +static int des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, unsigned char *iv, int enc) { des_cblock *deskey = (des_cblock *)key; @@ -98,9 +98,10 @@ static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); if (deskey != NULL) des_set_key_unchecked(deskey,ctx->c.des_ks); + return 1; } -static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, +static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, unsigned char *in, unsigned int inl) { des_cfb64_encrypt( @@ -108,5 +109,6 @@ static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, (long)inl, ctx->c.des_ks, (des_cblock *)&(ctx->iv[0]), &ctx->num,ctx->encrypt); + return 1; } #endif |