X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fe_cfb_d.c;h=6bdf20b6460f567690ebc09faff5ad6f9ff13a28;hb=10cea23bd46cb43fab1de5c59828ae67f80975c3;hp=08fad964a44086c34d8fc3b54c248747fefca0d0;hpb=6b691a5c85ddc4e407e32781841fee5c029506cd;p=oweals%2Fopenssl.git diff --git a/crypto/evp/e_cfb_d.c b/crypto/evp/e_cfb_d.c index 08fad964a4..6bdf20b646 100644 --- a/crypto/evp/e_cfb_d.c +++ b/crypto/evp/e_cfb_d.c @@ -58,19 +58,14 @@ #include #include "cryptlib.h" -#include "evp.h" -#include "objects.h" +#include +#include -#ifndef NOPROTO +#ifndef NO_DES static void 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, unsigned char *in, unsigned int inl); -#else -static void des_cfb_init_key(); -static void des_cfb_cipher(); -#endif - static EVP_CIPHER d_cfb_cipher= { NID_des_cfb64, @@ -92,13 +87,15 @@ EVP_CIPHER *EVP_des_cfb(void) static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, unsigned char *iv, int enc) { + des_cblock *deskey = (des_cblock *)key; + ctx->num=0; if (iv != NULL) memcpy(&(ctx->oiv[0]),iv,8); memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); - if (key != NULL) - des_set_key(key,ctx->c.des_ks); + if (deskey != NULL) + des_set_key(deskey,ctx->c.des_ks); } static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, @@ -107,6 +104,7 @@ static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, des_cfb64_encrypt( in,out, (long)inl, ctx->c.des_ks, - &(ctx->iv[0]), + (des_cblock *)&(ctx->iv[0]), &ctx->num,ctx->encrypt); } +#endif