Update Openssl

This commit is contained in:
Nautilus 2021-03-27 16:11:04 +05:30 committed by GitHub
parent e5b9a5e3f8
commit 6a16e464ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,44 +1,73 @@
#!/bin/bash #!/bin/bash
OPENSSL_REPO="https://github.com/openssl/openssl.git" OPENSSL_REPO="https://github.com/openssl/openssl.git"
OPENSSL_COMMIT="OpenSSL_1_1_1j"
OPENSSL_COMMIT="OpenSSL_1_1_1k"
ffbuild_enabled() { ffbuild_enabled() {
return 0 return 0
} }
ffbuild_dockerstage() { ffbuild_dockerstage() {
to_df "ADD $SELF /stage.sh" to_df "ADD $SELF /stage.sh"
to_df "RUN run_stage" to_df "RUN run_stage"
} }
ffbuild_dockerbuild() { ffbuild_dockerbuild() {
git-mini-clone "$OPENSSL_REPO" "$OPENSSL_COMMIT" openssl git-mini-clone "$OPENSSL_REPO" "$OPENSSL_COMMIT" openssl
cd openssl cd openssl
local myconf=( local myconf=(
threads threads
zlib zlib
no-shared no-shared
enable-camellia enable-camellia
enable-ec enable-ec
enable-srp enable-srp
--prefix="$FFBUILD_PREFIX" --prefix="$FFBUILD_PREFIX"
) )
if [[ $TARGET == win64 ]]; then if [[ $TARGET == win64 ]]; then
myconf+=( myconf+=(
--cross-compile-prefix="$FFBUILD_CROSS_PREFIX" --cross-compile-prefix="$FFBUILD_CROSS_PREFIX"
mingw64 mingw64
) )
elif [[ $TARGET == win32 ]]; then elif [[ $TARGET == win32 ]]; then
myconf+=( myconf+=(
--cross-compile-prefix="$FFBUILD_CROSS_PREFIX" --cross-compile-prefix="$FFBUILD_CROSS_PREFIX"
mingw mingw
) )
else else
echo "Unknown target" echo "Unknown target"
return -1 return -1
fi fi
./Configure "${myconf[@]}" || return -1 ./Configure "${myconf[@]}" || return -1
@ -46,8 +75,11 @@ ffbuild_dockerbuild() {
sed -i -e "/^CFLAGS=/s|=.*|=${CFLAGS}|" -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" Makefile || return -1 sed -i -e "/^CFLAGS=/s|=.*|=${CFLAGS}|" -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" Makefile || return -1
make -j$(nproc) || return -1 make -j$(nproc) || return -1
make install_sw || return -1 make install_sw || return -1
cd .. cd ..
rm -rf openssl rm -rf openssl
} }