tests: Do not process server config during tests

In pkd tests, avoid processing the global server configuration file.
This is to allow testing with algorithms not allowed in the global
server configuration.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-10-02 17:36:54 +02:00
committed by Andreas Schneider
parent f97a8b4e3f
commit 040aa0edfe

View File

@@ -252,6 +252,7 @@ static int pkd_exec_hello(int fd, struct pkd_daemon_args *args)
size_t kex_len = 0;
const char *all_ciphers = NULL;
const uint64_t rekey_data_limit = args->rekey_data_limit;
bool process_config = false;
pkd_state.eof_received = 0;
pkd_state.close_received = 0;
@@ -291,6 +292,13 @@ static int pkd_exec_hello(int fd, struct pkd_daemon_args *args)
goto outclose;
}
rc = ssh_bind_options_set(b, SSH_BIND_OPTIONS_PROCESS_CONFIG,
&process_config);
if (rc != 0) {
pkderr("ssh_bind_options_set process config: %s\n", ssh_get_error(b));
goto outclose;
}
if (!ssh_fips_mode()) {
/* Add methods not enabled by default */
#define GEX_SHA1 "diffie-hellman-group-exchange-sha1"