blob: 401a69c569bdbbbf823f459e934ec887d20d6419 [file] [log] [blame]
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -06001#!/bin/bash -eu
2
3# ssl-opt-in-docker.sh
4#
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -06005# Purpose
6# -------
7# This runs ssl-opt.sh in a Docker container.
8#
9# Notes for users
10# ---------------
Peter Kolbus4225b1a2019-05-31 06:38:06 -050011# If OPENSSL_CMD, GNUTLS_CLI, or GNUTLS_SERV are specified, the path must
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060012# correspond to an executable inside the Docker container. The special
13# values "next" and "legacy" are also allowed as shorthand for the
14# installations inside the container.
15#
16# See also:
17# - scripts/docker_env.sh for general Docker prerequisites and other information.
18# - ssl-opt.sh for notes about invocation of that script.
19
Bence Szépkúti1e148272020-08-07 13:07:28 +020020# Copyright The Mbed TLS Contributors
Peter Kolbus4225b1a2019-05-31 06:38:06 -050021# SPDX-License-Identifier: Apache-2.0
22#
23# Licensed under the Apache License, Version 2.0 (the "License"); you may
24# not use this file except in compliance with the License.
25# You may obtain a copy of the License at
26#
27# http://www.apache.org/licenses/LICENSE-2.0
28#
29# Unless required by applicable law or agreed to in writing, software
30# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
31# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32# See the License for the specific language governing permissions and
33# limitations under the License.
Peter Kolbus4225b1a2019-05-31 06:38:06 -050034
Peter Kolbuse4e2d3a2018-12-24 09:04:54 -060035source tests/scripts/docker_env.sh
36
37case "${OPENSSL_CMD:-default}" in
38 "legacy") export OPENSSL_CMD="/usr/local/openssl-1.0.1j/bin/openssl";;
39 "next") export OPENSSL_CMD="/usr/local/openssl-1.1.1a/bin/openssl";;
40 *) ;;
41esac
42
43case "${GNUTLS_CLI:-default}" in
44 "legacy") export GNUTLS_CLI="/usr/local/gnutls-3.3.8/bin/gnutls-cli";;
45 "next") export GNUTLS_CLI="/usr/local/gnutls-3.6.5/bin/gnutls-cli";;
46 *) ;;
47esac
48
49case "${GNUTLS_SERV:-default}" in
50 "legacy") export GNUTLS_SERV="/usr/local/gnutls-3.3.8/bin/gnutls-serv";;
51 "next") export GNUTLS_SERV="/usr/local/gnutls-3.6.5/bin/gnutls-serv";;
52 *) ;;
53esac
54
55run_in_docker \
56 -e P_SRV \
57 -e P_CLI \
58 -e P_PXY \
59 -e GNUTLS_CLI \
60 -e GNUTLS_SERV \
61 -e OPENSSL_CMD \
62 tests/ssl-opt.sh \
63 $@