Skip to content

Commit 955cf64

Browse files
committed
FEAT: refresh_upmc_certs.bash
0 parents  commit 955cf64

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

refresh_upmc_certs.bash

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
#
3+
# 20250313WF - init, copied from wiki (c. 20230707)
4+
# https://lncd.pitt.edu/wiki/doku.php?id=tools:certificates
5+
6+
# run as root
7+
if [ ! "$UID" -eq 0 ] ; then sudo "$0" "$@"; exit $?; fi
8+
9+
# github.com/LabNeuroCogDevel/lncdtools
10+
PATH="$PATH:/opt/ni_tools/lncdtools" # cp-date (and internally used 'dryrun')
11+
cd /usr/local/share/ca-certificates/ || exit 1
12+
13+
cert_loc=http://upmccrl.upmc.com/CDP/
14+
for crt in UPMC-CA23 UPMC-CA20 UPMC-ROOT-CA; do
15+
test -r "$crt.crt-der" && cp-date --mv "$crt.crt-der"
16+
wget "$cert_loc/$crt.crt" -O "$crt.crt-der" || continue
17+
openssl x509 -in $crt.crt-der -out $crt.crt -outform PEM
18+
done
19+
update-ca-certificates
20+
curl -svvI https://www.google.com
21+
openssl s_client -showcerts -servername google.com -connect www.google.com:443 <<< ""

0 commit comments

Comments
 (0)