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:
18
src/keys.c
18
src/keys.c
@@ -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;
|
||||||
|
@@ -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
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
Reference in New Issue
Block a user