| 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 | # | 
| Manuel Pégourié-Gonnard | 59626b6 | 2022-12-15 10:08:26 +0100 | [diff] [blame] | 9 | # WARNING: the Dockerfile used by this script is no longer maintained! See | 
|  | 10 | # https://github.com/Mbed-TLS/mbedtls-test/blob/master/README.md#quick-start | 
|  | 11 | # for the set of Docker images we use on the CI. | 
|  | 12 | # | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 13 | # Notes for users | 
|  | 14 | # --------------- | 
| Manuel Pégourié-Gonnard | c572246 | 2022-12-19 11:42:12 +0100 | [diff] [blame] | 15 | # If OPENSSL, GNUTLS_CLI, or GNUTLS_SERV are specified, the path must | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 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 |  | 
| Bence Szépkúti | 1e14827 | 2020-08-07 13:07:28 +0200 | [diff] [blame] | 24 | # Copyright The Mbed TLS Contributors | 
| Dave Rodgman | 16799db | 2023-11-02 19:47:20 +0000 | [diff] [blame] | 25 | # SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later | 
| Peter Kolbus | 4225b1a | 2019-05-31 06:38:06 -0500 | [diff] [blame] | 26 |  | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 27 | source tests/scripts/docker_env.sh | 
|  | 28 |  | 
| Manuel Pégourié-Gonnard | c572246 | 2022-12-19 11:42:12 +0100 | [diff] [blame] | 29 | case "${OPENSSL:-default}" in | 
|  | 30 | "legacy")  export OPENSSL="/usr/local/openssl-1.0.1j/bin/openssl";; | 
|  | 31 | "next")    export OPENSSL="/usr/local/openssl-1.1.1a/bin/openssl";; | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 32 | *) ;; | 
|  | 33 | esac | 
|  | 34 |  | 
|  | 35 | case "${GNUTLS_CLI:-default}" in | 
|  | 36 | "legacy")  export GNUTLS_CLI="/usr/local/gnutls-3.3.8/bin/gnutls-cli";; | 
| Jerry Yu | ab46aa0 | 2021-08-17 10:48:26 +0800 | [diff] [blame] | 37 | "next")  export GNUTLS_CLI="/usr/local/gnutls-3.7.2/bin/gnutls-cli";; | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 38 | *) ;; | 
|  | 39 | esac | 
|  | 40 |  | 
|  | 41 | case "${GNUTLS_SERV:-default}" in | 
|  | 42 | "legacy")  export GNUTLS_SERV="/usr/local/gnutls-3.3.8/bin/gnutls-serv";; | 
| Jerry Yu | ab46aa0 | 2021-08-17 10:48:26 +0800 | [diff] [blame] | 43 | "next")  export GNUTLS_SERV="/usr/local/gnutls-3.7.2/bin/gnutls-serv";; | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 44 | *) ;; | 
|  | 45 | esac | 
|  | 46 |  | 
|  | 47 | run_in_docker \ | 
|  | 48 | -e P_SRV \ | 
|  | 49 | -e P_CLI \ | 
|  | 50 | -e P_PXY \ | 
|  | 51 | -e GNUTLS_CLI \ | 
|  | 52 | -e GNUTLS_SERV \ | 
| Manuel Pégourié-Gonnard | c572246 | 2022-12-19 11:42:12 +0100 | [diff] [blame] | 53 | -e OPENSSL \ | 
| Peter Kolbus | e4e2d3a | 2018-12-24 09:04:54 -0600 | [diff] [blame] | 54 | tests/ssl-opt.sh \ | 
|  | 55 | $@ |