]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - cmdgen.c
Sort out the mess with OpenSSH key file formats.
authorSimon Tatham <anakin@pobox.com>
Sun, 10 May 2015 06:42:48 +0000 (07:42 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 10 May 2015 12:11:43 +0000 (13:11 +0100)
commit90af5bed04f8e4dcf7e42c464b1be6cc7056f768
tree501ef5b67d3c6aa4d86827f670a66949b7913e11
parent76a4b576e58fa3b245b02f9fbb052e4651acbfa9
Sort out the mess with OpenSSH key file formats.

When I implemented reading and writing of the new format a couple of
weeks ago, I kept them strictly separate in the UI, so you have to ask
for the format you want when exporting. But in fact this is silly,
because not every key type can be saved in both formats, and OpenSSH
itself has the policy of using the old format for key types it can
handle, unless specifically asked to use the new one.

So I've now arranged that the key file format enum has three values
for OpenSSH: PEM, NEW and AUTO. Files being loaded are identified as
either PEM or NEW, which describe the two physical file formats. But
exporting UIs present either AUTO or NEW, where AUTO is the virtual
format meaning 'save in the old format if possible, otherwise the new
one'.
cmdgen.c
import.c
ssh.h
sshpubk.c
windows/winpgen.c