From f7b521c8ef0ae9af918476f41c67c5b839c865b5 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 7 May 2023 17:35:50 +0200 Subject: [PATCH] openssl: Rename read_rsa_bignums() -> read_public_key(). This makes clear that the function is only used for public encryption. --- openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openssl.c b/openssl.c index bc287905..9804fe6c 100644 --- a/openssl.c +++ b/openssl.c @@ -97,7 +97,7 @@ static int read_bignum(const unsigned char *buf, size_t len, BIGNUM **result) return bnsize + 4; } -static int read_rsa_bignums(const unsigned char *blob, int blen, RSA **result) +static int read_public_key(const unsigned char *blob, int blen, RSA **result) { int ret; RSA *rsa; @@ -285,7 +285,7 @@ int apc_get_pubkey(const char *key_file, struct asymmetric_key **result) ret = decode_public_key(key_file, &blob, &decoded_size); if (ret < 0) goto out; - ret = read_rsa_bignums(blob + ret, decoded_size - ret, &key->rsa); + ret = read_public_key(blob + ret, decoded_size - ret, &key->rsa); if (ret < 0) goto free_blob; ret = RSA_size(key->rsa); -- 2.39.2