diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-04-26 21:55:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-04-26 21:55:05 +0000 |
commit | 36dec3d4e4487e274b7fbc86b320a5b82e5f37b4 (patch) | |
tree | ed14f50f37dbf8f96c05782f9802fd3d51b478b4 /usr.bin/ssh/ssh-keygen.c | |
parent | 2f0d5f00c413ab326bcc19c50b8742744e93a779 (diff) |
add -R flag: exit code indicates if RSA is alive
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 5482839578d..eae66500250 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$Id: ssh-keygen.c,v 1.19 2000/04/26 20:56:29 markus Exp $"); +RCSID("$Id: ssh-keygen.c,v 1.20 2000/04/26 21:55:04 deraadt Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -519,7 +519,7 @@ main(int ac, char **av) exit(1); } - while ((opt = getopt(ac, av, "dqpclxXyb:f:P:N:C:")) != EOF) { + while ((opt = getopt(ac, av, "dqpclRxXyb:f:P:N:C:")) != EOF) { switch (opt) { case 'b': bits = atoi(optarg); @@ -562,6 +562,13 @@ main(int ac, char **av) quiet = 1; break; + case 'R': + if (rsa_alive() == 0) + exit(1); + else + exit(0); + break; + case 'x': convert_to_ssh2 = 1; break; |