Skip to content

Commit

Permalink
ssl-opt.sh: Add a check of the list of supported ciphersuites
Browse files Browse the repository at this point in the history
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
  • Loading branch information
ronald-cron-arm authored and yuhaoth committed Nov 29, 2023
1 parent 46a660a commit a8b474f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions tests/ssl-opt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,18 @@ requires_protocol_version() {

# Space-separated list of ciphersuites supported by this build of
# Mbed TLS.
P_CIPHERSUITES=" $($P_CLI help_ciphersuites 2>/dev/null |
grep TLS- |
tr -s ' \n' ' ')"
P_CIPHERSUITES=""
if [ "$LIST_TESTS" -eq 0 ]; then
P_CIPHERSUITES=" $($P_CLI help_ciphersuites 2>/dev/null |
grep 'TLS-' |
tr -s ' \n' ' ')"

if [ -z "${P_CIPHERSUITES# }" ]; then
echo >&2 "$0: fatal error: no cipher suites found!"
exit 125
fi
fi

requires_ciphersuite_enabled() {
case $P_CIPHERSUITES in
*" $1 "*) :;;
Expand Down

0 comments on commit a8b474f

Please sign in to comment.