-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from devilbox/release-0.17
Trust custom certificates/CA if you choose to
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
Dockerfiles/work/data/docker-entrypoint.d/41-update-ca-certificates.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -u | ||
set -o pipefail | ||
|
||
|
||
############################################################ | ||
# Functions | ||
############################################################ | ||
|
||
### | ||
### Include certificates/CAs into own system | ||
### | ||
update_ca_certificates() { | ||
local dir="${1}" | ||
local debug="${2}" | ||
|
||
if [ -d "${dir}" ]; then | ||
for cert in $( find "${dir}" -name \*.crt ); do | ||
name="$( basename "${cert}" )" | ||
run "cp ${cert} /usr/local/share/ca-certificates/devilbox-${name}" "${debug}" | ||
done | ||
fi | ||
run "update-ca-certificates" "${debug}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters