move get_srv_psk_list

It can be reused in other test-suites

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
Jerry Yu 2022-11-07 13:12:44 +08:00
parent 50e00e3ac6
commit f467d46bbb
2 changed files with 10 additions and 9 deletions

View File

@ -18,15 +18,6 @@
# limitations under the License.
#
get_srv_psk_list ()
{
case $(( TESTS % 3 )) in
0) echo "psk_list=abc,dead,def,beef,Client_identity,6162636465666768696a6b6c6d6e6f70";;
1) echo "psk_list=abc,dead,Client_identity,6162636465666768696a6b6c6d6e6f70,def,beef";;
2) echo "psk_list=Client_identity,6162636465666768696a6b6c6d6e6f70,abc,dead,def,beef";;
esac
}
requires_gnutls_tls1_3
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_3
requires_config_enabled MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE

View File

@ -1024,6 +1024,16 @@ is_gnutls() {
esac
}
# Generate random psk_list argument for ssl_server2
get_srv_psk_list ()
{
case $(( TESTS % 3 )) in
0) echo "psk_list=abc,dead,def,beef,Client_identity,6162636465666768696a6b6c6d6e6f70";;
1) echo "psk_list=abc,dead,Client_identity,6162636465666768696a6b6c6d6e6f70,def,beef";;
2) echo "psk_list=Client_identity,6162636465666768696a6b6c6d6e6f70,abc,dead,def,beef";;
esac
}
# Determine what calc_verify trace is to be expected, if any.
#
# calc_verify is only called for two things: to calculate the