]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - openssl.c
openssl: Rename read_private_rsa_params() -> read_openssh_private_key().
[paraslash.git] / openssl.c
index bc287905c2f4036bfac69c42938d8f5b44a47a16..0808a8b09c22210e53ff6a4cd3b22f337aec7362 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;
@@ -149,7 +149,7 @@ bio_free:
        return *rsa? RSA_size(*rsa) : -E_PRIVATE_KEY;
 }
 
-static int read_private_rsa_params(const unsigned char *blob,
+static int read_openssh_private_key(const unsigned char *blob,
                const unsigned char *end, RSA **result)
 {
        int ret;
@@ -267,7 +267,7 @@ static int get_private_key(const char *path, RSA **rsa)
                if (ret < 0)
                        goto free_blob;
                PARA_INFO_LOG("reading RSA params at offset %d\n", ret);
-               ret = read_private_rsa_params(blob + ret, end, rsa);
+               ret = read_openssh_private_key(blob + ret, end, rsa);
        } else
                ret = read_pem_private_key(path, rsa);
 free_blob:
@@ -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);