summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-keygen.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2001-09-17 20:50:22 +0000
committermarkus <markus@openbsd.org>2001-09-17 20:50:22 +0000
commit4446ab1d4f8cddae800f4d9c3ec9779ffd9c2435 (patch)
treeb94887652ab623058af8bbdb01d871b687a15af9 /usr.bin/ssh/ssh-keygen.c
parentcleanup and document -1, -s and -S; ok markus@ (diff)
downloadwireguard-openbsd-4446ab1d4f8cddae800f4d9c3ec9779ffd9c2435.tar.xz
wireguard-openbsd-4446ab1d4f8cddae800f4d9c3ec9779ffd9c2435.zip
better error handling if you try to export a bad key to ssh.com
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r--usr.bin/ssh/ssh-keygen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index ed2be941870..2358111bcfd 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/ssh-keygen.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.80 2001/09/17 19:27:15 stevesk Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.81 2001/09/17 20:50:22 markus Exp $");
#include <openssl/evp.h>
#include <openssl/pem.h>
@@ -159,7 +159,10 @@ do_convert_to_ssh2(struct passwd *pw)
exit(1);
}
}
- key_to_blob(k, &blob, &len);
+ if (key_to_blob(k, &blob, &len) <= 0) {
+ fprintf(stderr, "key_to_blob failed\n");
+ exit(1);
+ }
fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN);
fprintf(stdout,
"Comment: \"%d-bit %s, converted from OpenSSH by %s@%s\"\n",