]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
openssl: Rename read_rsa_bignums() -> read_public_key().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 7 May 2023 15:35:50 +0000 (17:35 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 15 May 2023 18:06:50 +0000 (20:06 +0200)
This makes clear that the function is only used for public encryption.

openssl.c

index bc287905c2f4036bfac69c42938d8f5b44a47a16..9804fe6c74f01e89d5fcd10e3e916d55c7cb538b 100644 (file)
--- 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);