summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-16 23:03:12 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-16 23:06:13 +0200
commit2615f8bc949ff87eba3051ad9eb0f1e41cd8afb4 (patch)
tree363d4a5ce5b06828e2f3c659fd48005c594256af /src
parentc39181437b10fb49cd236f625c599c01af41f1b2 (diff)
downloadlibssh-2615f8bc949ff87eba3051ad9eb0f1e41cd8afb4.tar.gz
libssh-2615f8bc949ff87eba3051ad9eb0f1e41cd8afb4.tar.xz
libssh-2615f8bc949ff87eba3051ad9eb0f1e41cd8afb4.zip
tests: Added test for pubkey from privkey.
Diffstat (limited to 'src')
-rw-r--r--src/pki.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pki.c b/src/pki.c
index 2fe1528..0acc370 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -733,20 +733,20 @@ ssh_string ssh_pki_publickey_to_blob(const ssh_key key)
int ssh_pki_export_publickey_base64(const ssh_key key,
char **b64_key)
{
- ssh_string key_str;
+ ssh_string key_blob;
unsigned char *b64;
if (key == NULL || b64_key == NULL) {
return SSH_ERROR;
}
- key_str = pki_publickey_to_string(key);
- if (key_str == NULL) {
+ key_blob = pki_publickey_to_string(key);
+ if (key_blob == NULL) {
return SSH_ERROR;
}
- b64 = bin_to_base64(ssh_string_data(key_str), ssh_string_len(key_str));
- ssh_string_free(key_str);
+ b64 = bin_to_base64(ssh_string_data(key_blob), ssh_string_len(key_blob));
+ ssh_string_free(key_blob);
if (b64 == NULL) {
return SSH_ERROR;
}