diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2015-03-23 06:06:39 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2015-03-23 06:06:39 +0000 |
commit | a237f3ab36e80dccd3f080e1fd2fcd9ed4d3cdcb (patch) | |
tree | 9fd1c43948e208f71c791ddf94956d2faa2607d0 | |
parent | b8aed918656d98041cef3e5f753fced7b425b3fc (diff) |
for ssh-keygen -A, don't try (and fail) to generate
ssh v.1 keys when compiled without SSH1 support
RSA/DSA/ECDSA keys when compiled without OpenSSL
based on patch by Mike Frysinger; bz#2369
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index f3c23412ef6..5dcbc2e7b0b 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.266 2015/02/26 20:45:47 djm Exp $ */ +/* $OpenBSD: ssh-keygen.c,v 1.267 2015/03/23 06:06:38 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -930,10 +930,14 @@ do_gen_all_hostkeys(struct passwd *pw) char *key_type_display; char *path; } key_types[] = { +#ifdef WITH_OPENSSL +#ifdef WITH_SSH1 { "rsa1", "RSA1", _PATH_HOST_KEY_FILE }, +#endif /* WITH_SSH1 */ { "rsa", "RSA" ,_PATH_HOST_RSA_KEY_FILE }, { "dsa", "DSA", _PATH_HOST_DSA_KEY_FILE }, { "ecdsa", "ECDSA",_PATH_HOST_ECDSA_KEY_FILE }, +#endif /* WITH_OPENSSL */ { "ed25519", "ED25519",_PATH_HOST_ED25519_KEY_FILE }, { NULL, NULL, NULL } }; |