8 lines
282 B
Bash
Executable file
8 lines
282 B
Bash
Executable file
hostname=XXX
|
|
port=443
|
|
trust_cert_file_location=`curl-config --ca`
|
|
|
|
sudo bash -c "echo -n | openssl s_client -showcerts -connect $hostname:$port -servername $hostname \
|
|
2>/dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \
|
|
>> $trust_cert_file_location"
|
|
|