Skip to content

Commit 9c4fb72

Browse files
Symlink OpenSSL to LibreSSL in Alpine image
The commands used are identical for both the OpenSSL and LibreSSL, so let's create a symlink to LibreSSL in order to reduce the complexity of out scripts.
1 parent 35429d7 commit 9c4fb72

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/Dockerfile-alpine

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ RUN set -ex && \
4141
mkdir -p /etc/nginx/user_conf.d && \
4242
chown 82:82 -R /var/www \
4343
&& \
44+
# Symlink libressl so it is invoked when "openssl" is called by the scripts.
45+
ln -s /usr/bin/libressl /usr/bin/openssl \
46+
&& \
4447
# Make sure there are no surprise config files inside the config folder.
4548
rm -f /etc/nginx/conf.d/*
4649

src/scripts/create_dhparams.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,7 @@ create_dhparam() {
3434
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3535
"
3636
info "Will now output to the following file: '${1}'"
37-
if command -v libressl >/dev/null 2>&1; then
38-
debug "Using libressl for creating the dhparams"
39-
libressl dhparam -out "${1}" "${DHPARAM_SIZE}"
40-
else
41-
debug "Using openssl for creating the dhparams"
42-
openssl dhparam -out "${1}" "${DHPARAM_SIZE}"
43-
fi
37+
openssl dhparam -out "${1}" "${DHPARAM_SIZE}"
4438
info "
4539
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4640
% >>>>> Diffie-Hellman parameter creation done! <<<<< %

0 commit comments

Comments
 (0)