blob: bbb860a3d51bcd417ae9c4f50f6adbbfb3f43149 [file] [log] [blame]
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -06001#!/bin/bash -eu
2
3# compat-in-docker.sh
4#
5# This file is part of mbed TLS (https://tls.mbed.org)
6#
7# Copyright (c) 2019, ARM Limited, All Rights Reserved
8#
9# Purpose
10# -------
11# This runs compat.sh in a Docker container.
12#
13# Notes for users
14# ---------------
15# If OPENSSL_CMD, GNUTLS_CLI, or GNUTLS_SERV are specified the path must
16# correspond to an executable inside the Docker container. The special
17# values "next" (OpenSSL only) and "legacy" are also allowed as shorthand
18# for the installations inside the container.
19#
20# See also:
21# - scripts/docker_env.sh for general Docker prerequisites and other information.
22# - compat.sh for notes about invocation of that script.
23
24source tests/scripts/docker_env.sh
25
26case "${OPENSSL_CMD:-default}" in
27 "legacy") export OPENSSL_CMD="/usr/local/openssl-1.0.1j/bin/openssl";;
28 "next") export OPENSSL_CMD="/usr/local/openssl-1.1.1a/bin/openssl";;
29 *) ;;
30esac
31
32case "${GNUTLS_CLI:-default}" in
33 "legacy") export GNUTLS_CLI="/usr/local/gnutls-3.3.8/bin/gnutls-cli";;
34 "next") export GNUTLS_CLI="/usr/local/gnutls-3.6.5/bin/gnutls-cli";;
35 *) ;;
36esac
37
38case "${GNUTLS_SERV:-default}" in
39 "legacy") export GNUTLS_SERV="/usr/local/gnutls-3.3.8/bin/gnutls-serv";;
40 "next") export GNUTLS_SERV="/usr/local/gnutls-3.6.5/bin/gnutls-serv";;
41 *) ;;
42esac
43
44run_in_docker \
45 -e M_CLI \
46 -e M_SRV \
47 -e GNUTLS_CLI \
48 -e GNUTLS_SERV \
49 -e OPENSSL_CMD \
50 -e OSSL_NO_DTLS \
51 tests/compat.sh \
52 $@