summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2011-08-16 00:58:20 +0200
committerAndreas Schneider <asn@cryptomilk.org>2011-08-16 00:58:20 +0200
commit42dda7b958a480f288ff7b627ef0d93d4fd9459b (patch)
treebdf8ffaa45fadea645720f1e180de0b6ef31aa3c /src
parent614ad97c1271328363b5544d7723c00d7d01439b (diff)
downloadlibssh-42dda7b958a480f288ff7b627ef0d93d4fd9459b.tar.gz
libssh-42dda7b958a480f288ff7b627ef0d93d4fd9459b.tar.xz
libssh-42dda7b958a480f288ff7b627ef0d93d4fd9459b.zip
pki: Fix ssh_pki_publickey_to_base64() warnings.
Diffstat (limited to 'src')
-rw-r--r--src/pki.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/pki.c b/src/pki.c
index 7dc55b7..9bd4f53 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -730,12 +730,8 @@ ssh_string ssh_pki_publickey_to_blob(const ssh_key key)
int ssh_pki_publickey_to_base64(const ssh_key key, unsigned char **b64_key,
enum ssh_keytypes_e *ptype)
{
- enum ssh_keytypes_e type;
ssh_string key_str;
- ssh_buffer key_buf;
- char *type_c;
unsigned char *b64;
- int rc;
if (key == NULL || b64_key == NULL || ptype == NULL) {
return SSH_ERROR;
@@ -746,11 +742,10 @@ int ssh_pki_publickey_to_base64(const ssh_key key, unsigned char **b64_key,
return SSH_ERROR;
}
-
b64 = bin_to_base64(ssh_string_data(key_str), ssh_string_len(key_str));
ssh_string_free(key_str);
- *ptype = type;
+ *ptype = key->type;
*b64_key = b64;
return SSH_OK;