diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 5f031e278..0665a8ef3 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -946,7 +946,10 @@ send_request: printf( " > Write to server:" ); fflush( stdout ); - len = sprintf( (char *) buf, GET_REQUEST, opt.request_page ); + if( strcmp( opt.request_page, "SERVERQUIT" ) == 0 ) + len = sprintf( (char *) buf, "%s", opt.request_page ); + else + len = sprintf( (char *) buf, GET_REQUEST, opt.request_page ); for( written = 0, frags = 0; written < len; written += ret, frags++ ) { diff --git a/tests/compat.sh b/tests/compat.sh index 7fa858705..b0ced93bc 100755 --- a/tests/compat.sh +++ b/tests/compat.sh @@ -638,11 +638,16 @@ stop_server() { case $SERVER_NAME in [Pp]olar*) # we must force a PSK suite when in PSK mode (otherwise client - # auth will fail), so use $O_CIPHERS - CS=$( echo "$O_CIPHERS" | tr ' ' ':' ) - echo SERVERQUIT | \ - $OPENSSL s_client $O_CLIENT_ARGS -cipher "$CS" >/dev/null 2>&1 - sleep 1; kill $PROCESS_ID 2>/dev/null # XXX temporary + # auth will fail), so try every entry in $P_CIPHERS in turn (in + # case the first one is not implemented in this configuration) + for i in $P_CIPHERS; do + "$P_CLI" $P_CLIENT_ARGS request_page=SERVERQUIT auth_mode=none \ + crt_file=data_files/cli2.crt key_file=data_files/cli2.key \ + force_ciphersuite=$i >/dev/null + if [ "$?" == 0 ]; then + break + fi + done ;; *) kill $PROCESS_ID 2>/dev/null diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index b938c0218..ec5f0543c 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -121,9 +121,9 @@ run_test() { $SHELL -c "$CLI_CMD" >> cli_out 2>&1 CLI_EXIT=$? if is_polar "$SRV_CMD"; then - echo SERVERQUIT | $OPENSSL s_client -no_ticket \ - -cert data_files/cli2.crt -key data_files/cli2.key \ - >/dev/null 2>&1 + "$P_CLI" request_page=SERVERQUIT tickets=0 auth_mode=none \ + crt_file=data_files/cli2.crt key_file=data_files/cli2.key \ + >/dev/null else kill $SRV_PID fi