summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-09-06 07:53:40 +0000
committerDamien Miller <djm@mindrot.org>2019-09-08 14:49:04 +1000
commitc8bdd2db77ac2369d5cdee237656f266c8f41552 (patch)
tree9483ad1cdb4e0577813fcda98c04994eddc427ae
parent823f6c37eb2d8191d45539f7b6fa877a4cb4ed3d (diff)
upstream: key conversion should fail for !openssl builds, not fall
through to the key generation code OpenBSD-Commit-ID: b957436adc43c4941e61d61958a193a708bc83c9
-rw-r--r--ssh-keygen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 1a0d816e..570f3179 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.348 2019/09/06 05:23:55 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.349 2019/09/06 07:53:40 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3108,7 +3108,10 @@ main(int argc, char **argv)
do_convert_to(pw);
if (convert_from)
do_convert_from(pw);
-#endif
+#else /* WITH_OPENSSL */
+ if (convert_to || convert_from)
+ fatal("key conversion disabled at compile time");
+#endif /* WITH_OPENSSL */
if (print_public)
do_print_public(pw);
if (rr_hostname != NULL) {