mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
ktls_test: Add a require_toe option similar to require_ifnet.
This skips tests that send and receive records that do not use TOE TLS.
Sponsored by: Chelsio Communications
(cherry picked from commit cc13c98302)
This commit is contained in:
parent
39b724b727
commit
1a26ebd6d5
1 changed files with 12 additions and 0 deletions
|
|
@ -81,6 +81,18 @@ check_tls_mode(const atf_tc_t *tc, int s, int sockopt)
|
|||
if (mode != TCP_TLS_MODE_IFNET)
|
||||
atf_tc_skip("connection did not use ifnet TLS");
|
||||
}
|
||||
|
||||
if (atf_tc_get_config_var_as_bool_wd(tc, "ktls.require_toe", false)) {
|
||||
socklen_t len;
|
||||
int mode;
|
||||
|
||||
len = sizeof(mode);
|
||||
if (getsockopt(s, IPPROTO_TCP, sockopt, &mode, &len) == -1)
|
||||
atf_libc_error(errno, "Failed to fetch TLS mode");
|
||||
|
||||
if (mode != TCP_TLS_MODE_TOE)
|
||||
atf_tc_skip("connection did not use TOE TLS");
|
||||
}
|
||||
}
|
||||
|
||||
static char
|
||||
|
|
|
|||
Loading…
Reference in a new issue