summaryrefslogtreecommitdiffstats
path: root/crypto/evp/bio_enc.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2001-10-17 00:37:12 +0000
committerDr. Stephen Henson <steve@openssl.org>2001-10-17 00:37:12 +0000
commit581f1c84940d77451c2592e9fa470893f6c3c3eb (patch)
tree33ebc8fc45b20aceff7589249bbc9a12282d543d /crypto/evp/bio_enc.c
parent41ebed27faa5e7b283313f97729a9f52746c1ac2 (diff)
Modify EVP cipher behaviour in a similar way
to digests to retain compatibility.
Diffstat (limited to 'crypto/evp/bio_enc.c')
-rw-r--r--crypto/evp/bio_enc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c
index d9278fb507..05f4249458 100644
--- a/crypto/evp/bio_enc.c
+++ b/crypto/evp/bio_enc.c
@@ -184,7 +184,7 @@ static int enc_read(BIO *b, char *out, int outl)
if (!BIO_should_retry(b->next_bio))
{
ctx->cont=i;
- i=EVP_CipherFinal(&(ctx->cipher),
+ i=EVP_CipherFinal_ex(&(ctx->cipher),
(unsigned char *)ctx->buf,
&(ctx->buf_len));
ctx->ok=i;
@@ -298,7 +298,7 @@ static long enc_ctrl(BIO *b, int cmd, long num, void *ptr)
case BIO_CTRL_RESET:
ctx->ok=1;
ctx->finished=0;
- EVP_CipherInit(&(ctx->cipher),NULL,NULL,NULL,
+ EVP_CipherInit_ex(&(ctx->cipher),NULL,NULL,NULL,NULL,
ctx->cipher.encrypt);
ret=BIO_ctrl(b->next_bio,cmd,num,ptr);
break;
@@ -335,7 +335,7 @@ again:
{
ctx->finished=1;
ctx->buf_off=0;
- ret=EVP_CipherFinal(&(ctx->cipher),
+ ret=EVP_CipherFinal_ex(&(ctx->cipher),
(unsigned char *)ctx->buf,
&(ctx->buf_len));
ctx->ok=(int)ret;
@@ -421,7 +421,7 @@ void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, unsigned char *k,
b->init=1;
ctx=(BIO_ENC_CTX *)b->ptr;
- EVP_CipherInit(&(ctx->cipher),c,k,i,e);
+ EVP_CipherInit_ex(&(ctx->cipher),c,NULL, k,i,e);
if (b->callback != NULL)
b->callback(b,BIO_CB_CTRL,(const char *)c,BIO_CTRL_SET,e,1L);