[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on ssh_auth_pubkey (was: privatekey_from_file)


On Tuesday 22 December 2009 13:44:41 Vic Lee wrote:
> Hmm... after some checking in auth.c, it seems there's no way to change
> ssh_auth_pubkey() function to check the existence of a .pub file, since
> it does not have a file name parameter. So how about this:
> 
> 1. In ssh_auth_pubkey(), if publickey is NULL, call
> publickey_from_privatekey() to generate it.
> 
> 2. Add a new function ssh_auth_privatekey_file(), which takes the file
> name and passphrase of the private key as parameter. The logic looks
> like:
> ssh_auth_privatekey_file(keyfile, passphrase) {
>   if (exists <keyfile>.pub) {
>     pubkey = publickey_from_file(<keyfile>.pub, &keytype);
>     privkey = privatekey_from_file(<keyfile>, keytype, passphrase);
>     ssh_auth_pubkey(pubkey, privkey);
>   }
>   else {
>     /* auto-detect private key type */
>     privkey = privatekey_from_file(<keyfile>, 0, passphrase);
>     /* auto-generate pubkey implemented in 1. above */
>     ssh_auth_pubkey(NULL, privkey);
>   }
> }
> 

Ups, sorry for the late reply. I've talked to Aris and this sounds good.

We try to fix master and keep it will try to keep it in a working state in the 
future. Authentication works again...

I will try to start with gssapi support, but first I will implement some 
testing framework.



	-- andreas

Attachment: signature.asc
Description: This is a digitally signed message part.


References:
Question on privatekey_from_fileVic Lee <llyzs@xxxxxxx>
Re: Question on privatekey_from_fileAndreas Schneider <mail@xxxxxxxxxxxx>
Re: Question on ssh_auth_pubkey (was: privatekey_from_file)Vic Lee <llyzs@xxxxxxx>
Archive administrator: postmaster@lists.cynapses.org