aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-19 11:14:23 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-19 11:14:23 +0200
commitc575de17a8d020149ac9122da3b772ebca180115 (patch)
tree98ee403bee5aa2e21ab51d4cca50da50c12f76db /src
parent3e56ac650cdd5d28fd3a4c6b1e6686b3a7725e7e (diff)
downloadlibssh-c575de17a8d020149ac9122da3b772ebca180115.tar.gz
libssh-c575de17a8d020149ac9122da3b772ebca180115.tar.xz
libssh-c575de17a8d020149ac9122da3b772ebca180115.zip
pki: Use a consistent naming scheme.
Diffstat (limited to 'src')
-rw-r--r--src/legacy.c4
-rw-r--r--src/pki.c16
-rw-r--r--src/pki_crypto.c2
-rw-r--r--src/pki_gcrypt.c2
4 files changed, 12 insertions, 12 deletions
diff --git a/src/legacy.c b/src/legacy.c
index ec81c220..531feb6e 100644
--- a/src/legacy.c
+++ b/src/legacy.c
@@ -355,7 +355,7 @@ ssh_string publickey_from_file(ssh_session session, const char *filename,
return NULL;
}
- key_str = ssh_pki_publickey_to_blob(key);
+ key_str = ssh_pki_export_pubkey_blob(key);
if (key_str == NULL) {
return NULL;
}
@@ -420,7 +420,7 @@ ssh_string publickey_to_string(ssh_public_key pubkey) {
key->dsa = pubkey->dsa_pub;
key->rsa = pubkey->rsa_pub;
- key_blob = ssh_pki_publickey_to_blob(key);
+ key_blob = ssh_pki_export_pubkey_blob(key);
key->dsa = NULL;
key->rsa = NULL;
diff --git a/src/pki.c b/src/pki.c
index 0acc3705..ebe2f04a 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -710,13 +710,13 @@ ssh_key ssh_pki_publickey_from_privatekey(const ssh_key privkey) {
*
* @return The key_blob or NULL on error.
*/
-ssh_string ssh_pki_publickey_to_blob(const ssh_key key)
+ssh_string ssh_pki_export_pubkey_blob(const ssh_key key)
{
if (key == NULL) {
return NULL;
}
- return pki_publickey_to_string(key);
+ return pki_publickey_to_blob(key);
}
/**
@@ -730,8 +730,8 @@ ssh_string ssh_pki_publickey_to_blob(const ssh_key key)
*
* @see ssh_string_free_char()
*/
-int ssh_pki_export_publickey_base64(const ssh_key key,
- char **b64_key)
+int ssh_pki_export_pubkey_base64(const ssh_key key,
+ char **b64_key)
{
ssh_string key_blob;
unsigned char *b64;
@@ -740,7 +740,7 @@ int ssh_pki_export_publickey_base64(const ssh_key key,
return SSH_ERROR;
}
- key_blob = pki_publickey_to_string(key);
+ key_blob = pki_publickey_to_blob(key);
if (key_blob == NULL) {
return SSH_ERROR;
}
@@ -756,8 +756,8 @@ int ssh_pki_export_publickey_base64(const ssh_key key,
return SSH_OK;
}
-int ssh_pki_export_publickey_file(const ssh_key key,
- const char *filename)
+int ssh_pki_export_pubkey_file(const ssh_key key,
+ const char *filename)
{
char key_buf[4096];
char host[256];
@@ -781,7 +781,7 @@ int ssh_pki_export_publickey_file(const ssh_key key,
return SSH_ERROR;
}
- rc = ssh_pki_export_publickey_base64(key, &b64_key);
+ rc = ssh_pki_export_pubkey_base64(key, &b64_key);
if (rc < 0) {
free(user);
return SSH_ERROR;
diff --git a/src/pki_crypto.c b/src/pki_crypto.c
index 64ffdc07..700408c4 100644
--- a/src/pki_crypto.c
+++ b/src/pki_crypto.c
@@ -350,7 +350,7 @@ int pki_pubkey_build_rsa(ssh_key key,
return SSH_OK;
}
-ssh_string pki_publickey_to_string(const ssh_key key)
+ssh_string pki_publickey_to_blob(const ssh_key key)
{
ssh_buffer buffer;
ssh_string type_s;
diff --git a/src/pki_gcrypt.c b/src/pki_gcrypt.c
index 53509002..06c2cf7f 100644
--- a/src/pki_gcrypt.c
+++ b/src/pki_gcrypt.c
@@ -985,7 +985,7 @@ fail:
return NULL;
}
-ssh_string pki_publickey_to_string(const ssh_key key)
+ssh_string pki_publickey_to_blob(const ssh_key key)
{
ssh_buffer buffer;
ssh_string type_s;