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

Re: pki_private_key_from_base64: key flags issue

On Sunday 24 August 2014 12:18:55 Artyom Poptsov wrote:
> Hello,


> I found that `pki_private_key_from_base64' procedure returns a key with
> both private and public flag set.  It makes it impossible to determine
> whether the key is public or private with `ssh_key_is_private' and
> `ssh_key_is_public' predicates because they both return 1 (true) for the
> key.
> The issue was found in libssh 0.6.3 and as far as I can see it persists
> in the latest commits in the repository.
> Is it done intentionally?

A key is always a public key but it may have be a private key too. You can get 
a public key from a private key, see ssh_pki_export_privkey_to_pubkey():


	-- andreas

Andreas Schneider                   GPG-ID: CC014E3D
www.cryptomilk.org                asn@xxxxxxxxxxxxxx

Re: pki_private_key_from_base64: key flags issueAris Adamantiadis <aris@xxxxxxxxxxxx>
Re: pki_private_key_from_base64: key flags issue [SOLVED]Artyom Poptsov <poptsov.artyom@xxxxxxxxx>
pki_private_key_from_base64: key flags issueArtyom Poptsov <poptsov.artyom@xxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org