diff options
author | tb <> | 2023-12-20 13:34:47 +0000 |
---|---|---|
committer | tb <> | 2023-12-20 13:34:47 +0000 |
commit | e58654a59313620227d09ebcc2d6594fc5957a1b (patch) | |
tree | 46d44e76cad0efcc6c5ddf6d3ca81852dbb3d9bd | |
parent | c51b1ef48597ca2e1456b504f3be9077a5e42ba2 (diff) | |
download | openbsd-e58654a59313620227d09ebcc2d6594fc5957a1b.tar.gz openbsd-e58654a59313620227d09ebcc2d6594fc5957a1b.tar.bz2 openbsd-e58654a59313620227d09ebcc2d6594fc5957a1b.zip |
Less confusing variable names in EVP_PKEY_{de,en}crypt_old()
ok jsing
-rw-r--r-- | src/lib/libcrypto/evp/p_dec.c | 10 | ||||
-rw-r--r-- | src/lib/libcrypto/evp/p_enc.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/libcrypto/evp/p_dec.c b/src/lib/libcrypto/evp/p_dec.c index 2c63fe054e..78a5ab4823 100644 --- a/src/lib/libcrypto/evp/p_dec.c +++ b/src/lib/libcrypto/evp/p_dec.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p_dec.c,v 1.16 2023/12/20 10:14:14 tb Exp $ */ | 1 | /* $OpenBSD: p_dec.c,v 1.17 2023/12/20 13:34:47 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -64,14 +64,14 @@ | |||
64 | #include "evp_local.h" | 64 | #include "evp_local.h" |
65 | 65 | ||
66 | int | 66 | int |
67 | EVP_PKEY_decrypt_old(unsigned char *key, const unsigned char *ek, int ekl, | 67 | EVP_PKEY_decrypt_old(unsigned char *to, const unsigned char *from, int from_len, |
68 | EVP_PKEY *priv) | 68 | EVP_PKEY *pkey) |
69 | { | 69 | { |
70 | if (priv->type != EVP_PKEY_RSA) { | 70 | if (pkey->type != EVP_PKEY_RSA) { |
71 | EVPerror(EVP_R_PUBLIC_KEY_NOT_RSA); | 71 | EVPerror(EVP_R_PUBLIC_KEY_NOT_RSA); |
72 | return -1; | 72 | return -1; |
73 | } | 73 | } |
74 | 74 | ||
75 | return RSA_private_decrypt(ekl, ek, key, priv->pkey.rsa, | 75 | return RSA_private_decrypt(from_len, from, to, pkey->pkey.rsa, |
76 | RSA_PKCS1_PADDING); | 76 | RSA_PKCS1_PADDING); |
77 | } | 77 | } |
diff --git a/src/lib/libcrypto/evp/p_enc.c b/src/lib/libcrypto/evp/p_enc.c index b6346260e5..549ac897af 100644 --- a/src/lib/libcrypto/evp/p_enc.c +++ b/src/lib/libcrypto/evp/p_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: p_enc.c,v 1.16 2023/12/20 10:14:14 tb Exp $ */ | 1 | /* $OpenBSD: p_enc.c,v 1.17 2023/12/20 13:34:47 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -64,14 +64,14 @@ | |||
64 | #include "evp_local.h" | 64 | #include "evp_local.h" |
65 | 65 | ||
66 | int | 66 | int |
67 | EVP_PKEY_encrypt_old(unsigned char *ek, const unsigned char *key, int key_len, | 67 | EVP_PKEY_encrypt_old(unsigned char *to, const unsigned char *from, int from_len, |
68 | EVP_PKEY *pubk) | 68 | EVP_PKEY *pkey) |
69 | { | 69 | { |
70 | if (pubk->type != EVP_PKEY_RSA) { | 70 | if (pkey->type != EVP_PKEY_RSA) { |
71 | EVPerror(EVP_R_PUBLIC_KEY_NOT_RSA); | 71 | EVPerror(EVP_R_PUBLIC_KEY_NOT_RSA); |
72 | return 0; | 72 | return 0; |
73 | } | 73 | } |
74 | 74 | ||
75 | return RSA_public_encrypt(key_len, key, ek, pubk->pkey.rsa, | 75 | return RSA_public_encrypt(from_len, from, to, pkey->pkey.rsa, |
76 | RSA_PKCS1_PADDING); | 76 | RSA_PKCS1_PADDING); |
77 | } | 77 | } |