diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2018-08-08 01:16:02 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2018-08-08 01:16:02 +0000 |
commit | 95cf33e4589b924bf45d1e2627a57c5e8c1769e3 (patch) | |
tree | 3f7b4751eb34d99f31975424ba89af874457184b /usr.bin/ssh/ssh-keygen.c | |
parent | 1c23e48616582e6da667ccebaf123452520a1876 (diff) |
Use new private key format by default. This format is suported by
OpenSSH >= 6.5 (released January 2014), so it should be supported by
most OpenSSH versions in active use.
It is possible to convert new-format private keys to the older
format using "ssh-keygen -f /path/key -pm PEM".
ok deraadt dtucker
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 2c3a6dd1f5b..12a5addb957 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-keygen.c,v 1.318 2018/07/09 21:59:10 markus Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.319 2018/08/08 01:16:01 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -172,7 +172,7 @@ char *key_type_name = NULL; char *pkcs11provider = NULL; /* Use new OpenSSH private key format when writing SSH2 keys instead of PEM */ -int use_new_format = 0; +int use_new_format = 1; /* Cipher for new-format private keys */ char *new_format_cipher = NULL; @@ -2413,6 +2413,7 @@ main(int argc, char **argv) } if (strcasecmp(optarg, "PEM") == 0) { convert_format = FMT_PEM; + use_new_format = 0; break; } fatal("Unsupported conversion format \"%s\"", optarg); @@ -2420,7 +2421,7 @@ main(int argc, char **argv) cert_principals = optarg; break; case 'o': - use_new_format = 1; + /* no-op; new format is already the default */ break; case 'p': change_passphrase = 1; |