summaryrefslogtreecommitdiffstats
path: root/src/pki.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-09 18:05:47 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-09 18:05:47 +0200
commit9c0af42dd8a4b7a8280e030b6dac8daf79afff40 (patch)
tree45ae984740ce4bf53f72878e5bdc998c680ab1d8 /src/pki.c
parentbec483bc1874909be8fd9c8fbc909f53be5ba27a (diff)
downloadlibssh-9c0af42dd8a4b7a8280e030b6dac8daf79afff40.tar.gz
libssh-9c0af42dd8a4b7a8280e030b6dac8daf79afff40.tar.xz
libssh-9c0af42dd8a4b7a8280e030b6dac8daf79afff40.zip
pki: Use a consistent name scheme.
Rename ssh_key_import_private to ssh_pki_import_privkey_file.
Diffstat (limited to 'src/pki.c')
-rw-r--r--src/pki.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/pki.c b/src/pki.c
index 73e2edd..7685dfa 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -200,19 +200,27 @@ int ssh_key_is_private(ssh_key k) {
}
/**
- * @brief import a key from a file
- * @param[out] key the ssh_key to update
- * @param[in] session The SSH Session to use. If a key decryption callback is set, it will
- * be used to ask for the passphrase.
+ * @brief Import a key from a file.
+ *
+ * @param[in] session The SSH Session to use. If a authentication callback is
+ * set, it will be used to ask for the passphrase.
+ *
* @param[in] filename The filename of the the private key.
- * @param[in] passphrase The passphrase to decrypt the private key. Set to null
+ *
+ * @param[in] passphrase The passphrase to decrypt the private key. Set to NULL
* if none is needed or it is unknown.
+ *
+ * @param[out] pkey A pointer to store the ssh_key. You need to free the
+ * key.
+ *
* @returns SSH_OK on success, SSH_ERROR otherwise.
+ *
+ * @see ssh_key_free()
**/
-int ssh_key_import_private(ssh_session session,
- const char *filename,
- const char *passphrase,
- ssh_key *pkey) {
+int ssh_pki_import_privkey_file(ssh_session session,
+ const char *filename,
+ const char *passphrase,
+ ssh_key *pkey) {
struct stat sb;
char *key_buf;
ssh_key key;