On Sunday 24 August 2014 12:18:55 Artyom Poptsov wrote: > Hello, Hi,
> 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(): http://api.libssh.org/stable/group__libssh__pki.html#ga5777bc537da6a447b2a9aa9eceff9877 -- andreas -- Andreas Schneider GPG-ID: CC014E3D www.cryptomilk.org [email protected]
