| 1 | #!/bin/bash |
| 2 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | # You may not use this file except in compliance with the License. |
| 6 | # A copy of the License is located at |
| 7 | # |
| 8 | # http://aws.amazon.com/apache2.0 |
| 9 | # |
| 10 | # or in the "license" file accompanying this file. This file is distributed |
| 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | # express or implied. See the License for the specific language governing |
| 13 | # permissions and limitations under the License. |
| 14 | |
| 15 | case "${S2N_BUILD_PRESET-default}" in |
| 16 | "awslc_gcc4-8") |
| 17 | : "${S2N_LIBCRYPTO:=awslc}" |
| 18 | : "${GCC_VERSION:=4.8}" |
| 19 | ;; |
| 20 | "awslc_gcc9") |
| 21 | : "${S2N_LIBCRYPTO:=awslc}" |
| 22 | : "${GCC_VERSION:=9}" |
| 23 | ;; |
| 24 | "awslc-fips-2022_gcc4-8") |
| 25 | : "${S2N_LIBCRYPTO:=awslc-fips-2022}" |
| 26 | : "${GCC_VERSION:=4.8}" |
| 27 | ;; |
| 28 | "awslc-fips-2022_gcc9") |
| 29 | : "${S2N_LIBCRYPTO:=awslc-fips-2022}" |
| 30 | : "${GCC_VERSION:=9}" |
| 31 | ;; |
| 32 | "awslc-fips-2022_gcc6") |
| 33 | : "${S2N_LIBCRYPTO:=awslc-fips-2022}" |
| 34 | : "${GCC_VERSION:=6}" |
| 35 | ;; |
| 36 | "libressl_gcc6") |
| 37 | : "${S2N_LIBCRYPTO:=libressl}" |
| 38 | : "${GCC_VERSION:=6}" |
| 39 | ;; |
| 40 | "libressl_gcc9") |
| 41 | : "${S2N_LIBCRYPTO:=libressl}" |
| 42 | : "${GCC_VERSION:=9}" |
| 43 | ;; |
| 44 | "boringssl") |
| 45 | : "${S2N_LIBCRYPTO:=boringssl}" |
| 46 | : "${GCC_VERSION:=9}" |
| 47 | ;; |
| 48 | "openssl-1.0.2") |
| 49 | : "${S2N_LIBCRYPTO:=openssl-1.0.2}" |
| 50 | : "${GCC_VERSION:=6}" |
| 51 | ;; |
| 52 | "openssl-1.0.2-fips") |
| 53 | : "${S2N_LIBCRYPTO:=openssl-1.0.2-fips}" |
| 54 | : "${GCC_VERSION:=4.8}" |
| 55 | ;; |
| 56 | "openssl-1.1.1_gcc4-8") |
| 57 | : "${S2N_LIBCRYPTO:=openssl-1.1.1}" |
| 58 | : "${GCC_VERSION:=4.8}" |
| 59 | ;; |
| 60 | "openssl-1.1.1_gcc6") |
| 61 | : "${S2N_LIBCRYPTO:=openssl-1.1.1}" |
| 62 | : "${GCC_VERSION:=6}" |
| 63 | : "${S2N_CORKED_IO:=true}" |
| 64 | ;; |
| 65 | "openssl-1.1.1_gcc6_softcrypto") |
| 66 | : "${S2N_LIBCRYPTO:=openssl-1.1.1}" |
| 67 | : "${GCC_VERSION:=6}" |
| 68 | : "${OPENSSL_ia32cap:=~0x200000200000000}" |
| 69 | ;; |
| 70 | "openssl-1.1.1_gcc9") |
| 71 | : "${S2N_LIBCRYPTO:=openssl-1.1.1}" |
| 72 | : "${GCC_VERSION:=9}" |
| 73 | ;; |
| 74 | "openssl-3.0") |
| 75 | : "${S2N_LIBCRYPTO:=openssl-3.0}" |
| 76 | : "${GCC_VERSION:=9}" |
| 77 | ;; |
| 78 | "openssl-3.0-fips") |
| 79 | : "${S2N_LIBCRYPTO:=openssl-3.0-fips}" |
| 80 | : "${GCC_VERSION:=9}" |
| 81 | ;; |
| 82 | esac |
| 83 |