diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-08-15 20:42:26 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-08-16 00:47:43 +0200 |
commit | 6c1b508efd5c8d5081d26d2c085f201ebeafaa0b (patch) | |
tree | 2fb2d664bfb3f4599068511af593fcbe018e2c02 /src/pki.c | |
parent | 714fa8960d52c5154faa55f5bdd3784657636884 (diff) | |
download | libssh-6c1b508efd5c8d5081d26d2c085f201ebeafaa0b.tar.gz libssh-6c1b508efd5c8d5081d26d2c085f201ebeafaa0b.tar.xz libssh-6c1b508efd5c8d5081d26d2c085f201ebeafaa0b.zip |
pki: Rename ssh_pki_import_pubkey_string and make it public.
It should be named ssh_pki_import_pubkey_blob().
Diffstat (limited to 'src/pki.c')
-rw-r--r-- | src/pki.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -542,7 +542,8 @@ int ssh_pki_import_pubkey_base64(ssh_session session, * * @param[in] session The ssh session to use. * - * @param[in] keystring The key as a string to import. + * @param[in] key_blob The key blob to import as specified in RFC 4253 section + * 6.6 "Public Key Algorithms". * * @param[out] pkey A pointer where the key can be stored. You need * to free the memory. @@ -551,15 +552,15 @@ int ssh_pki_import_pubkey_base64(ssh_session session, * * @see ssh_key_free() */ -int ssh_pki_import_pubkey_string(ssh_session session, - const ssh_string pubkey, - ssh_key *pkey) { +int ssh_pki_import_pubkey_blob(ssh_session session, + const ssh_string key_blob, + ssh_key *pkey) { ssh_buffer buffer; ssh_string type_s = NULL; char *type_c = NULL; int rc; - if (pubkey == NULL || pkey == NULL) { + if (key_blob == NULL || pkey == NULL) { return SSH_ERROR; } @@ -569,8 +570,8 @@ int ssh_pki_import_pubkey_string(ssh_session session, return SSH_ERROR; } - rc = buffer_add_data(buffer, ssh_string_data(pubkey), - ssh_string_len(pubkey)); + rc = buffer_add_data(buffer, ssh_string_data(key_blob), + ssh_string_len(key_blob)); if (rc < 0) { ssh_set_error_oom(session); goto fail; |