summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-08-08 01:16:01 +0000
committerDamien Miller <djm@mindrot.org>2018-08-08 11:18:05 +1000
commited7bd5d93fe14c7bd90febd29b858ea985d14d45 (patch)
treed33efae6fa03d1242f851b3d2f21b808809cde37 /ssh-keygen.c
parent967226a1bdde59ea137e8f0df871854ff7b91366 (diff)
upstream: 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 OpenBSD-Commit-ID: e3bd4f2509a2103bfa2f710733426af3ad6d8ab8
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 3c9677057..22860ad90 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.318 2018/07/09 21:59:10 markus Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.319 2018/08/08 01:16:01 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -179,7 +179,7 @@ char *key_type_name = NULL;
179char *pkcs11provider = NULL; 179char *pkcs11provider = NULL;
180 180
181/* Use new OpenSSH private key format when writing SSH2 keys instead of PEM */ 181/* Use new OpenSSH private key format when writing SSH2 keys instead of PEM */
182int use_new_format = 0; 182int use_new_format = 1;
183 183
184/* Cipher for new-format private keys */ 184/* Cipher for new-format private keys */
185char *new_format_cipher = NULL; 185char *new_format_cipher = NULL;
@@ -2434,6 +2434,7 @@ main(int argc, char **argv)
2434 } 2434 }
2435 if (strcasecmp(optarg, "PEM") == 0) { 2435 if (strcasecmp(optarg, "PEM") == 0) {
2436 convert_format = FMT_PEM; 2436 convert_format = FMT_PEM;
2437 use_new_format = 0;
2437 break; 2438 break;
2438 } 2439 }
2439 fatal("Unsupported conversion format \"%s\"", optarg); 2440 fatal("Unsupported conversion format \"%s\"", optarg);
@@ -2441,7 +2442,7 @@ main(int argc, char **argv)
2441 cert_principals = optarg; 2442 cert_principals = optarg;
2442 break; 2443 break;
2443 case 'o': 2444 case 'o':
2444 use_new_format = 1; 2445 /* no-op; new format is already the default */
2445 break; 2446 break;
2446 case 'p': 2447 case 'p':
2447 change_passphrase = 1; 2448 change_passphrase = 1;