diff --git a/src/opts.c b/src/opts.c index 98223f4..314927e 100644 --- a/src/opts.c +++ b/src/opts.c @@ -1050,7 +1050,7 @@ conn_opts_str(conn_opts_t *conn_opts) #ifndef WITHOUT_USERAUTH "%s|%s|%d" #endif /* !WITHOUT_USERAUTH */ - "%s|%d", + "%s%s|%d", #if (OPENSSL_VERSION_NUMBER < 0x10100000L) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20702000L) #ifdef HAVE_SSLV2 (conn_opts->sslmethod == SSLv2_method) ? "ssl2" : @@ -1184,6 +1184,7 @@ conn_opts_str(conn_opts_t *conn_opts) conn_opts->user_timeout, #endif /* !WITHOUT_USERAUTH */ (conn_opts->validate_proto ? "|validate_proto" : ""), + (conn_opts->reconnect_ssl ? "|reconnect_ssl" : ""), conn_opts->max_http_header_size ) < 0) { return oom_return_na_null(); diff --git a/tests/check/filterstruct.t.c b/tests/check/filterstruct.t.c index bc6156c..70d5df1 100644 --- a/tests/check/filterstruct.t.c +++ b/tests/check/filterstruct.t.c @@ -4179,12 +4179,12 @@ START_TEST(set_filter_struct_16) #ifndef WITHOUT_USERAUTH fail_unless(!strcmp(s, "filter rule 0: site=192.168.0.2, port=, ip=192.168.0.1, user=, desc=, exact=site||ip||, all=|||, action=||||match, log=connect|||||, apply to=dstip||||, precedence=3\n" - " conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|2048"), + " conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|reconnect_ssl|2048"), "failed to parse rule: %s", s); #else /* WITHOUT_USERAUTH */ fail_unless(!strcmp(s, "filter rule 0: site=192.168.0.2, port=, ip=192.168.0.1, exact=site||ip, all=||, action=||||match, log=connect|||||, apply to=dstip||||, precedence=3\n" - " conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|2048"), + " conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|reconnect_ssl|2048"), "failed to parse rule: %s", s); #endif /* WITHOUT_USERAUTH */ free(s); @@ -4205,7 +4205,7 @@ START_TEST(set_filter_struct_16) " ip 0 192.168.0.1 (exact)=\n" " ip exact:\n" " 0: 192.168.0.2 (exact, action=||||match, log=connect|||||, precedence=3\n" -" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|2048)\n" +" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|reconnect_ssl|2048)\n" "ip_filter_substring->\n" "filter_all->\n"), "failed to translate rule: %s", s); #else /* WITHOUT_USERAUTH */ @@ -4214,7 +4214,7 @@ START_TEST(set_filter_struct_16) " ip 0 192.168.0.1 (exact)=\n" " ip exact:\n" " 0: 192.168.0.2 (exact, action=||||match, log=connect|||||, precedence=3\n" -" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|2048)\n" +" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|reconnect_ssl|2048)\n" "ip_filter_substring->\n" "filter_all->\n"), "failed to translate rule: %s", s); #endif /* WITHOUT_USERAUTH */ diff --git a/tests/check/opts.t.c b/tests/check/opts.t.c index dadb8b8..fea7c0f 100644 --- a/tests/check/opts.t.c +++ b/tests/check/opts.t.c @@ -751,7 +751,7 @@ START_TEST(proxyspec_struct_parse_01) "filter rule 4: site=127.0.0.1, port=9191, ip=127.0.0.1, user=, desc=, exact=site|port|ip||, all=|||, action=|split|||, log=|||content||, apply to=dstip||||, precedence=4\n" "filter rule 5: site=127.0.0.1, port=9191, ip=127.0.0.1, user=, desc=, exact=site|port|ip||, all=|||, action=divert||||, log=|||content||, apply to=dstip||||, precedence=4\n" "filter rule 6: site=192.168.0.2, port=, ip=192.168.0.1, user=, desc=, exact=site||ip||, all=|||, action=||||match, log=connect|||||, apply to=dstip||||, precedence=3\n" -" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|2048\n" +" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|reconnect_ssl|2048\n" "filter=>\n" "userdesc_filter_exact->\n" "userdesc_filter_substring->\n" @@ -769,7 +769,7 @@ START_TEST(proxyspec_struct_parse_01) " ip 1 192.168.0.1 (exact)=\n" " ip exact:\n" " 0: 192.168.0.2 (exact, action=||||match, log=connect|||||, precedence=3\n" -" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|2048)\n" +" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|https://192.168.0.12/userdblogin1.php|1200|reconnect_ssl|2048)\n" "ip_filter_substring->\n" "filter_all->\n" " sni exact:\n" @@ -793,7 +793,7 @@ START_TEST(proxyspec_struct_parse_01) "filter rule 4: site=127.0.0.1, port=9191, ip=127.0.0.1, exact=site|port|ip, all=||, action=|split|||, log=|||content||, apply to=dstip||||, precedence=4\n" "filter rule 5: site=127.0.0.1, port=9191, ip=127.0.0.1, exact=site|port|ip, all=||, action=divert||||, log=|||content||, apply to=dstip||||, precedence=4\n" "filter rule 6: site=192.168.0.2, port=, ip=192.168.0.1, exact=site||ip, all=||, action=||||match, log=connect|||||, apply to=dstip||||, precedence=3\n" -" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|2048\n" +" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|http://example1.com/example1.crl|allow_wrong_host|reconnect_ssl|2048\n" "filter=>\n" "ip_filter_exact->\n" " ip 0 127.0.0.1 (exact)=\n" @@ -804,7 +804,7 @@ START_TEST(proxyspec_struct_parse_01) " ip 1 192.168.0.1 (exact)=\n" " ip exact:\n" " 0: 192.168.0.2 (exact, action=||||match, log=connect|||||, precedence=3\n" -" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|2048)\n" +" conn opts: tls11 -tls13>=tls10<=tls11|no_tls13|passthrough|LOW|TLS_AES_128_CCM_SHA256|prime192v1|no leafcrlurl|allow_wrong_host|reconnect_ssl|2048)\n" "ip_filter_substring->\n" "filter_all->\n" " sni exact:\n"