summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-07 04:40:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-10-07 04:40:04 +0000
commit7dc53b5df09d520d9c33c7c8d3751cb025536b0c (patch)
treedacccbee2174ee255d5d77c93b0d8b533a2c9f5b /usr.bin
parent24081ffd0c00f71c73bf151410dd791176ea48b9 (diff)
add -Q flag: says whether ssh RSA check should whine on stdout
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sshd.c22
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);