generated from govpf/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_certs
29 lines (23 loc) · 908 Bytes
/
install_certs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
CA_ARTIFACTORY_URL="https://bin.gov.pf/artifactory/ca"
CA_CERTINOMIS_URL="https://www.certinomis.fr/publi/cer"
CA_CERTIGNA_URL="http://autorite.certigna.fr"
CERT_URLS="$CA_ARTIFACTORY_URL/casit.crt \
$CA_ARTIFACTORY_URL/casit-prod2.crt \
$CA_ARTIFACTORY_URL/cadsi-prod.crt \
$CA_CERTINOMIS_URL/AC_Racine_G3.cer \
$CA_CERTINOMIS_URL/AC_2017_web.pem.cer \
$CA_CERTINOMIS_URL/AC_CERTINOMIS_SSL.cer \
$CA_CERTINOMIS_URL/AC_AGENTS.cer \
$CA_CERTIGNA_URL/certignarootca.crt \
$CA_CERTIGNA_URL/servicesca.crt"
for cert_url in $CERT_URLS
do
cert_file="$(basename "$cert_url")"
cert_path="/usr/local/share/ca-certificates/$cert_file"
curl "$cert_url" -o "$cert_path"
# Badly formatted certs break the entire file in alpine
# Adds an eol char at the end of the file if not already present
sed -i -e '$a\' "$cert_path"
done
update-ca-certificates