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

pki: Make ssh_type_from_name() a legacy function.

This commit is contained in:
Andreas Schneider
2011-08-16 00:55:47 +02:00
parent 04ce7967b8
commit 614ad97c12
2 changed files with 5 additions and 18 deletions

View File

@@ -44,24 +44,6 @@
* @{ * @{
*/ */
int ssh_type_from_name(const char *name) {
if (strcmp(name, "rsa1") == 0) {
return SSH_KEYTYPE_RSA1;
} else if (strcmp(name, "rsa") == 0) {
return SSH_KEYTYPE_RSA;
} else if (strcmp(name, "dsa") == 0) {
return SSH_KEYTYPE_DSS;
} else if (strcmp(name, "ssh-rsa1") == 0) {
return SSH_KEYTYPE_RSA1;
} else if (strcmp(name, "ssh-rsa") == 0) {
return SSH_KEYTYPE_RSA;
} else if (strcmp(name, "ssh-dss") == 0) {
return SSH_KEYTYPE_DSS;
}
return -1;
}
ssh_public_key publickey_make_dss(ssh_session session, ssh_buffer buffer) { ssh_public_key publickey_make_dss(ssh_session session, ssh_buffer buffer) {
ssh_string p = NULL; ssh_string p = NULL;
ssh_string q = NULL; ssh_string q = NULL;

View File

@@ -342,6 +342,11 @@ ssh_string publickey_from_file(ssh_session session, const char *filename,
const char *ssh_type_to_char(int type) { const char *ssh_type_to_char(int type) {
return ssh_key_type_to_char(type); return ssh_key_type_to_char(type);
} }
int ssh_type_from_name(const char *name) {
return ssh_key_type_from_name(name);
}
/**************************************************************************** /****************************************************************************
* SERVER SUPPORT * SERVER SUPPORT
****************************************************************************/ ****************************************************************************/