aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/libssh/keyfiles.h3
-rw-r--r--include/libssh/libssh.h3
-rw-r--r--src/legacy.c34
3 files changed, 0 insertions, 40 deletions
diff --git a/include/libssh/keyfiles.h b/include/libssh/keyfiles.h
index ac5feb0..80e989f 100644
--- a/include/libssh/keyfiles.h
+++ b/include/libssh/keyfiles.h
@@ -30,7 +30,4 @@ ssh_string try_publickey_from_file(ssh_session session,
struct ssh_keys_struct keytab,
char **privkeyfile, int *type);
-ssh_private_key privatekey_from_base64(ssh_session session, const char *b64_pkey,
- int type, const char *passphrase);
-
#endif /* KEYFILES_H_ */
diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h
index 62a210a..1e5f835 100644
--- a/include/libssh/libssh.h
+++ b/include/libssh/libssh.h
@@ -547,9 +547,6 @@ LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd);
LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session);
LIBSSH_API void ssh_event_free(ssh_event event);
-LIBSSH_API ssh_private_key privatekey_from_base64(ssh_session session, const char *b64_pkey,
- int type, const char *passphrase);
-
#ifndef LIBSSH_LEGACY_0_4
#include "libssh/legacy.h"
#endif
diff --git a/src/legacy.c b/src/legacy.c
index 4c52d98..2789b1c 100644
--- a/src/legacy.c
+++ b/src/legacy.c
@@ -343,40 +343,6 @@ char *string_to_char(ssh_string str){
return ssh_string_to_char(str);
}
-ssh_private_key privatekey_from_base64(ssh_session session,
- const char *b64_pkey,
- int type,
- const char *passphrase) {
- ssh_auth_callback auth_fn = NULL;
- void *auth_data = NULL;
- ssh_private_key privkey;
- ssh_key key;
-
- (void) type; /* unused */
-
- if (session->common.callbacks) {
- auth_fn = session->common.callbacks->auth_function;
- auth_data = session->common.callbacks->userdata;
- }
-
- key = pki_private_key_from_base64(b64_pkey, passphrase, auth_fn, auth_data);
- if (key == NULL) {
- return NULL;
- }
-
- privkey = malloc(sizeof(struct ssh_private_key_struct));
- if (privkey == NULL) {
- ssh_key_free(key);
- return NULL;
- }
-
- privkey->type = key->type;
- privkey->dsa_priv = key->dsa;
- privkey->rsa_priv = key->rsa;
-
- return privkey;
-}
-
ssh_private_key privatekey_from_file(ssh_session session,
const char *filename,
int type,