Skip to content

Commit

Permalink
respect SSL_CERT_FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
mikz committed Oct 23, 2017
1 parent 79b1573 commit ca8e14a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions apicast/.s2i/environment
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
OPENSSL_VERIFY=false
SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
2 changes: 1 addition & 1 deletion apicast/.s2iignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.s2i
.s2i/bin
conf/ca-bundle.crt
apicast.d/proxy_ssl.conf
4 changes: 3 additions & 1 deletion apicast/libexec/run
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

ssl=$(mktemp -q)

certificate=${SSL_CERT_FILE:-"$(pwd)/conf/ca-bundle.crt"}

echo "lua_ssl_verify_depth 5;" >> "${ssl}"
echo "lua_ssl_trusted_certificate \"$(pwd)/conf/ca-bundle.crt\";" >> "${ssl}"
echo "lua_ssl_trusted_certificate \"${certificate}\";" >> "${ssl}"

exec resty --http-include "${ssl}" "libexec/$(basename "$0").lua" "$@"

0 comments on commit ca8e14a

Please sign in to comment.