mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
pki: Rename ssh_pki_publickey_to_string and make it public.
This commit is contained in:
@@ -440,6 +440,7 @@ LIBSSH_API int ssh_pki_import_pubkey_base64(ssh_session session,
|
|||||||
LIBSSH_API int ssh_pki_import_pubkey_blob(ssh_session session,
|
LIBSSH_API int ssh_pki_import_pubkey_blob(ssh_session session,
|
||||||
const ssh_string key_blob,
|
const ssh_string key_blob,
|
||||||
ssh_key *pkey);
|
ssh_key *pkey);
|
||||||
|
LIBSSH_API ssh_string ssh_pki_publickey_to_blob(const ssh_key key);
|
||||||
|
|
||||||
LIBSSH_API int ssh_userauth_pki_pubkey(ssh_session session, const char *username,
|
LIBSSH_API int ssh_userauth_pki_pubkey(ssh_session session, const char *username,
|
||||||
ssh_string publickey, ssh_key privatekey);
|
ssh_string publickey, ssh_key privatekey);
|
||||||
|
@@ -68,7 +68,6 @@ void ssh_key_clean (ssh_key key);
|
|||||||
ssh_key ssh_pki_publickey_from_privatekey(const ssh_key privkey);
|
ssh_key ssh_pki_publickey_from_privatekey(const ssh_key privkey);
|
||||||
ssh_string ssh_pki_do_sign(ssh_session session, ssh_buffer sigbuf,
|
ssh_string ssh_pki_do_sign(ssh_session session, ssh_buffer sigbuf,
|
||||||
ssh_key privatekey);
|
ssh_key privatekey);
|
||||||
ssh_string ssh_pki_publickey_to_string(const ssh_key key);
|
|
||||||
|
|
||||||
/* temporary functions, to be removed after migration to ssh_key */
|
/* temporary functions, to be removed after migration to ssh_key */
|
||||||
ssh_public_key ssh_pki_convert_key_to_publickey(ssh_key key);
|
ssh_public_key ssh_pki_convert_key_to_publickey(ssh_key key);
|
||||||
|
@@ -622,14 +622,17 @@ ssh_key ssh_pki_publickey_from_privatekey(const ssh_key privkey) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create a ssh string from a public key.
|
* @brief Create a key_blob from a public key.
|
||||||
|
*
|
||||||
|
* The "key_blob" is encoded as per RFC 4253 section 6.6 "Public Key
|
||||||
|
* Algorithms" for any of the supported protocol 2 key types.
|
||||||
*
|
*
|
||||||
* @param[in] key A public or private key to create the public ssh_string
|
* @param[in] key A public or private key to create the public ssh_string
|
||||||
* from.
|
* from.
|
||||||
*
|
*
|
||||||
* @return The string or NULL on error.
|
* @return The key_blob or NULL on error.
|
||||||
*/
|
*/
|
||||||
ssh_string ssh_pki_publickey_to_string(const ssh_key key)
|
ssh_string ssh_pki_publickey_to_blob(const ssh_key key)
|
||||||
{
|
{
|
||||||
if (key == NULL) {
|
if (key == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user