diff options
author | 1999-10-07 04:40:03 +0000 | |
---|---|---|
committer | 1999-10-07 04:40:03 +0000 | |
commit | fdb186ec1f6645cfd8aa6a375266261a0a9b9bac (patch) | |
tree | cae5368af7a4cb8763eadf400148ca07d38cd3cd | |
parent | Yes, I think I've finally decided how I think scrollback should behave. (diff) | |
download | wireguard-openbsd-fdb186ec1f6645cfd8aa6a375266261a0a9b9bac.tar.xz wireguard-openbsd-fdb186ec1f6645cfd8aa6a375266261a0a9b9bac.zip |
add -Q flag: says whether ssh RSA check should whine on stdout
-rw-r--r-- | usr.bin/ssh/sshd.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index 913de8201df..166c9256a9e 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -18,7 +18,7 @@ agent connections. */ #include "includes.h" -RCSID("$Id: sshd.c,v 1.22 1999/10/05 22:18:52 markus Exp $"); +RCSID("$Id: sshd.c,v 1.23 1999/10/07 04:40:03 deraadt Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -230,6 +230,7 @@ main(int ac, char **av) extern int optind; int opt, aux, sock_in, sock_out, newsock, i, pid, on = 1; int remote_major, remote_minor; + int silentrsa = 0; struct sockaddr_in sin; char buf[100]; /* Must not be larger than remote_version. */ char remote_version[100]; /* Must be at least as big as buf. */ @@ -244,17 +245,11 @@ main(int ac, char **av) else av0 = av[0]; - /* check if RSA support exists */ - if (rsa_alive() == 0) { - log("no RSA support in libssl and libcrypto -- exiting. See ssl(8)"); - exit(1); - } - /* Initialize configuration options to their default values. */ initialize_server_options(&options); /* Parse command-line arguments. */ - while ((opt = getopt(ac, av, "f:p:b:k:h:g:diq")) != EOF) + while ((opt = getopt(ac, av, "f:p:b:k:h:g:diqQ")) != EOF) { switch (opt) { @@ -267,6 +262,9 @@ main(int ac, char **av) case 'i': inetd_flag = 1; break; + case 'Q': + silentrsa = 1; + break; case 'q': options.quiet_mode = 1; break; @@ -304,6 +302,14 @@ main(int ac, char **av) } } + /* check if RSA support exists */ + if (rsa_alive() == 0) { + if (silentrsa == 0) + printf("sshd: no RSA support in libssl and libcrypto -- exiting. See ssl(8)\n"); + log("no RSA support in libssl and libcrypto -- exiting. See ssl(8)"); + exit(1); + } + /* Read server configuration options from the configuration file. */ read_server_config(&options, config_file_name); |