aboutsummaryrefslogtreecommitdiff
path: root/crypto/pem/pvkfmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pem/pvkfmt.c')
-rw-r--r--crypto/pem/pvkfmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/pem/pvkfmt.c b/crypto/pem/pvkfmt.c
index 2bbee4a306e4..1fc19c17f913 100644
--- a/crypto/pem/pvkfmt.c
+++ b/crypto/pem/pvkfmt.c
@@ -844,9 +844,9 @@ static int i2b_PVK(unsigned char **out, EVP_PKEY *pk, int enclevel,
if (!EVP_EncryptInit_ex(cctx, EVP_rc4(), NULL, keybuf, NULL))
goto error;
OPENSSL_cleanse(keybuf, 20);
- if (!EVP_DecryptUpdate(cctx, p, &enctmplen, p, pklen - 8))
+ if (!EVP_EncryptUpdate(cctx, p, &enctmplen, p, pklen - 8))
goto error;
- if (!EVP_DecryptFinal_ex(cctx, p + enctmplen, &enctmplen))
+ if (!EVP_EncryptFinal_ex(cctx, p + enctmplen, &enctmplen))
goto error;
}