From 5f3989c503a942220dc369a91daa5b7bf7a8135e Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 20 Dec 2023 13:34:47 +0000 Subject: [PATCH] Less confusing variable names in EVP_PKEY_{de,en}crypt_old() ok jsing --- lib/libcrypto/evp/p_dec.c | 10 +++++----- lib/libcrypto/evp/p_enc.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/libcrypto/evp/p_dec.c b/lib/libcrypto/evp/p_dec.c index 2c63fe054e7..78a5ab48232 100644 --- a/lib/libcrypto/evp/p_dec.c +++ b/lib/libcrypto/evp/p_dec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_dec.c,v 1.16 2023/12/20 10:14:14 tb Exp $ */ +/* $OpenBSD: p_dec.c,v 1.17 2023/12/20 13:34:47 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -64,14 +64,14 @@ #include "evp_local.h" int -EVP_PKEY_decrypt_old(unsigned char *key, const unsigned char *ek, int ekl, - EVP_PKEY *priv) +EVP_PKEY_decrypt_old(unsigned char *to, const unsigned char *from, int from_len, + EVP_PKEY *pkey) { - if (priv->type != EVP_PKEY_RSA) { + if (pkey->type != EVP_PKEY_RSA) { EVPerror(EVP_R_PUBLIC_KEY_NOT_RSA); return -1; } - return RSA_private_decrypt(ekl, ek, key, priv->pkey.rsa, + return RSA_private_decrypt(from_len, from, to, pkey->pkey.rsa, RSA_PKCS1_PADDING); } diff --git a/lib/libcrypto/evp/p_enc.c b/lib/libcrypto/evp/p_enc.c index b6346260e57..549ac897afe 100644 --- a/lib/libcrypto/evp/p_enc.c +++ b/lib/libcrypto/evp/p_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p_enc.c,v 1.16 2023/12/20 10:14:14 tb Exp $ */ +/* $OpenBSD: p_enc.c,v 1.17 2023/12/20 13:34:47 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -64,14 +64,14 @@ #include "evp_local.h" int -EVP_PKEY_encrypt_old(unsigned char *ek, const unsigned char *key, int key_len, - EVP_PKEY *pubk) +EVP_PKEY_encrypt_old(unsigned char *to, const unsigned char *from, int from_len, + EVP_PKEY *pkey) { - if (pubk->type != EVP_PKEY_RSA) { + if (pkey->type != EVP_PKEY_RSA) { EVPerror(EVP_R_PUBLIC_KEY_NOT_RSA); return 0; } - return RSA_public_encrypt(key_len, key, ek, pubk->pkey.rsa, + return RSA_public_encrypt(from_len, from, to, pkey->pkey.rsa, RSA_PKCS1_PADDING); } -- 2.20.1