summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-04-23 11:15:05 +0200
committerAndreas Schneider <asn@cryptomilk.org>2014-05-06 08:54:06 +0200
commitd366e289f3dcd20c554d2fbf6de7b7b58b744adc (patch)
treeec4dbbd7b9538d9a5fdc00de34b092e55f344ab3
parent2fc83475041acc955ef0fe7a879567b262e3b36e (diff)
pki: Move ssh_pki_key_ecdsa_name() to the correct file.
(cherry picked from commit f48a99b97c399174ad35b83a91df922f106ade13)
-rw-r--r--src/pki.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/pki.c b/src/pki.c
index f3e195a4..63b3547d 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -99,6 +99,20 @@ enum ssh_keytypes_e pki_privatekey_type_from_string(const char *privkey) {
}
/**
+ * @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
* @returns an empty ssh_key handle, or NULL on error.
*/