From df3e497dbd3e52c16b77bed3379c0b281d991825 Mon Sep 17 00:00:00 2001 From: milo Date: Wed, 9 Mar 2011 12:57:26 +0100 Subject: [pki] Added privatekey_from_base64() function... and wrapped it with privatekey_from_file() --- include/libssh/keyfiles.h | 3 +++ include/libssh/libssh.h | 3 +++ 2 files changed, 6 insertions(+) (limited to 'include/libssh') diff --git a/include/libssh/keyfiles.h b/include/libssh/keyfiles.h index 80e989f..ac5feb0 100644 --- a/include/libssh/keyfiles.h +++ b/include/libssh/keyfiles.h @@ -30,4 +30,7 @@ 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 733429a..4051f73 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -490,6 +490,9 @@ 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 -- cgit