diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2001-10-17 00:37:12 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2001-10-17 00:37:12 +0000 |
commit | 581f1c84940d77451c2592e9fa470893f6c3c3eb (patch) | |
tree | 33ebc8fc45b20aceff7589249bbc9a12282d543d /crypto/pem/pem_lib.c | |
parent | 41ebed27faa5e7b283313f97729a9f52746c1ac2 (diff) | |
download | openssl-581f1c84940d77451c2592e9fa470893f6c3c3eb.tar.gz |
Modify EVP cipher behaviour in a similar way
to digests to retain compatibility.
Diffstat (limited to 'crypto/pem/pem_lib.c')
-rw-r--r-- | crypto/pem/pem_lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/pem/pem_lib.c b/crypto/pem/pem_lib.c index 1c1a64a711..f5ae9d7cbd 100644 --- a/crypto/pem/pem_lib.c +++ b/crypto/pem/pem_lib.c @@ -346,9 +346,9 @@ int PEM_ASN1_write_bio(int (*i2d)(), const char *name, BIO *bp, char *x, PEM_dek_info(buf,objstr,8,(char *)iv); /* k=strlen(buf); */ - EVP_EncryptInit(&ctx,enc,key,iv); + EVP_EncryptInit_ex(&ctx,enc,NULL,key,iv); EVP_EncryptUpdate(&ctx,data,&j,data,i); - EVP_EncryptFinal(&ctx,&(data[j]),&i); + EVP_EncryptFinal_ex(&ctx,&(data[j]),&i); i+=j; ret=1; } @@ -399,9 +399,9 @@ int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen, (unsigned char *)buf,klen,1,key,NULL); j=(int)len; - EVP_DecryptInit(&ctx,cipher->cipher,key,&(cipher->iv[0])); + EVP_DecryptInit_ex(&ctx,cipher->cipher,NULL, key,&(cipher->iv[0])); EVP_DecryptUpdate(&ctx,data,&i,data,j); - o=EVP_DecryptFinal(&ctx,&(data[i]),&j); + o=EVP_DecryptFinal_ex(&ctx,&(data[i]),&j); EVP_CIPHER_CTX_cleanup(&ctx); memset((char *)buf,0,sizeof(buf)); memset((char *)key,0,sizeof(key)); |