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/asn1/n_pkey.c | |
parent | 41ebed27faa5e7b283313f97729a9f52746c1ac2 (diff) |
Modify EVP cipher behaviour in a similar way
to digests to retain compatibility.
Diffstat (limited to 'crypto/asn1/n_pkey.c')
-rw-r--r-- | crypto/asn1/n_pkey.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/asn1/n_pkey.c b/crypto/asn1/n_pkey.c index 7a1d9ba39a..49f80fffd2 100644 --- a/crypto/asn1/n_pkey.c +++ b/crypto/asn1/n_pkey.c @@ -207,9 +207,9 @@ int i2d_RSA_NET(const RSA *a, unsigned char **pp, int (*cb)(), int sgckey) /* Encrypt private key in place */ zz = enckey->enckey->digest->data; EVP_CIPHER_CTX_init(&ctx); - EVP_EncryptInit(&ctx,EVP_rc4(),key,NULL); + EVP_EncryptInit_ex(&ctx,EVP_rc4(),NULL,key,NULL); EVP_EncryptUpdate(&ctx,zz,&i,zz,pkeylen); - EVP_EncryptFinal(&ctx,zz + i,&j); + EVP_EncryptFinal_ex(&ctx,zz + i,&j); EVP_CIPHER_CTX_cleanup(&ctx); ret = i2d_NETSCAPE_ENCRYPTED_PKEY(enckey, pp); @@ -293,9 +293,9 @@ static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os, memset(buf,0,256); EVP_CIPHER_CTX_init(&ctx); - EVP_DecryptInit(&ctx,EVP_rc4(),key,NULL); + EVP_DecryptInit_ex(&ctx,EVP_rc4(),NULL, key,NULL); EVP_DecryptUpdate(&ctx,os->data,&i,os->data,os->length); - EVP_DecryptFinal(&ctx,&(os->data[i]),&j); + EVP_DecryptFinal_ex(&ctx,&(os->data[i]),&j); EVP_CIPHER_CTX_cleanup(&ctx); os->length=i+j; |