Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 1 | #!/bin/bash -eu |
| 2 | |
| 3 | # ssl-opt-in-docker.sh |
| 4 | # |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 5 | # Purpose |
| 6 | # ------- |
| 7 | # This runs ssl-opt.sh in a Docker container. |
| 8 | # |
| 9 | # Notes for users |
| 10 | # --------------- |
Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 11 | # If OPENSSL_CMD, GNUTLS_CLI, or GNUTLS_SERV are specified, the path must |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 12 | # 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úti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 20 | # Copyright The Mbed TLS Contributors |
Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 21 | # 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 Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 34 | |
Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 35 | source tests/scripts/docker_env.sh |
| 36 | |
| 37 | case "${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 | *) ;; |
| 41 | esac |
| 42 | |
| 43 | case "${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 | *) ;; |
| 47 | esac |
| 48 | |
| 49 | case "${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 | *) ;; |
| 53 | esac |
| 54 | |
| 55 | run_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 | $@ |