Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame^] | 1 | #!/bin/bash -eu |
| 2 | |
| 3 | # ssl-opt-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 ssl-opt.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" and "legacy" are also allowed as shorthand for the |
| 18 | # installations inside the container. |
| 19 | # |
| 20 | # See also: |
| 21 | # - scripts/docker_env.sh for general Docker prerequisites and other information. |
| 22 | # - ssl-opt.sh for notes about invocation of that script. |
| 23 | |
| 24 | source tests/scripts/docker_env.sh |
| 25 | |
| 26 | case "${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 | *) ;; |
| 30 | esac |
| 31 | |
| 32 | case "${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 | *) ;; |
| 36 | esac |
| 37 | |
| 38 | case "${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 | *) ;; |
| 42 | esac |
| 43 | |
| 44 | run_in_docker \ |
| 45 | -e P_SRV \ |
| 46 | -e P_CLI \ |
| 47 | -e P_PXY \ |
| 48 | -e GNUTLS_CLI \ |
| 49 | -e GNUTLS_SERV \ |
| 50 | -e OPENSSL_CMD \ |
| 51 | tests/ssl-opt.sh \ |
| 52 | $@ |