[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
password protected rsa server key.
[Thread Prev] | [Thread Next]
- Subject: password protected rsa server key.
- From: drbob <drbob@xxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 27 Aug 2013 00:39:44 +1000
- To: libssh@xxxxxxxxxx
Hi,
I've just checked out V0.6.0rc1, because I heard a rumour that it was possible to load your own RSA key from memory...
Having looked through the code, I see that the framework is there,
but some external facing functions/options seem to be missing (or more likely I missed them!).
Basically, I want to load a protected RSA key - without the password prompt.
There appears to be two ways to do this,
with a function like: pki.cc: pki_private_key_from_base64( ) - from memory.
or, pki.cc: ssh_pki_import_privkey_file(...) - from protected file.
Both functions have a "password" parameter / auth callback which is perfect for my needs.
But, it seems I cannot set the password, or import an rsa key via the set_bind_options() or ssh_bind structure.
bind.c:147
-------
int ssh_bind_listen(ssh_bind sshbind)
{
...
if (sshbind->rsakey) {
rc = ssh_pki_import_privkey_file(sshbind->rsakey,
NULL, <---- PASSWORD PARAMETER.
NULL, <---- auth_cb
NULL,
&sshbind->rsa);
...
}
Is it possible to add a SSH_BIND_OPTIONS_PASSWORD ???
or is there a way to set the auth_callback for the bind_listen ???
======
Alternatively, I noticed:
include/libssh/libssh.h:486:LIBSSH_API int ssh_pki_import_privkey_base64(const char *b64_key,...)
Is it possible to use this function to set the RSA key on the ssh_bind structure ???
The ssh_bind_listen() fn requires "rsakey" (filename) set, and doesn't accept setting "rsa".
-----------------
Would love to have this feature in libssh0.6 release, and it is so close to there.
Thanks for your time and effort developing libssh!
drbob.
| How to get | Исаев Виталий Анатольевич <isaev@xxxxxxxxxx> |
| Re: How to get | Aris Adamantiadis <aris@xxxxxxxxxxxx> |