1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-08 19:02:06 +03:00

pki: Move ssh_pki_key_ecdsa_name() to the correct file.

This commit is contained in:
Andreas Schneider
2014-04-23 11:15:05 +02:00
parent 11cfb2903e
commit f48a99b97c
2 changed files with 14 additions and 14 deletions

View File

@@ -98,6 +98,20 @@ enum ssh_keytypes_e pki_privatekey_type_from_string(const char *privkey) {
return SSH_KEYTYPE_UNKNOWN; return SSH_KEYTYPE_UNKNOWN;
} }
/**
* @brief returns the ECDSA key name ("ecdsa-sha2-nistp256" for example)
*
* @param[in] key the ssh_key whose ECDSA name to get
*
* @returns the ECDSA key name ("ecdsa-sha2-nistp256" for example)
*
* @returns "unknown" if the ECDSA key name is not known
*/
const char *ssh_pki_key_ecdsa_name(const ssh_key key)
{
return pki_key_ecdsa_nid_to_name(key->ecdsa_nid);
}
/** /**
* @brief creates a new empty SSH key * @brief creates a new empty SSH key
* @returns an empty ssh_key handle, or NULL on error. * @returns an empty ssh_key handle, or NULL on error.

View File

@@ -105,20 +105,6 @@ const char *pki_key_ecdsa_nid_to_name(int nid)
return "unknown"; return "unknown";
} }
/**
* @brief returns the ECDSA key name ("ecdsa-sha2-nistp256" for example)
*
* @param[in] key the ssh_key whose ECDSA name to get
*
* @returns the ECDSA key name ("ecdsa-sha2-nistp256" for example)
*
* @returns "unknown" if the ECDSA key name is not known
*/
const char *ssh_pki_key_ecdsa_name(const ssh_key key)
{
return pki_key_ecdsa_nid_to_name(key->ecdsa_nid);
}
static const char *pki_key_ecdsa_nid_to_char(int nid) static const char *pki_key_ecdsa_nid_to_char(int nid)
{ {
switch (nid) { switch (nid) {