HP Insight Control for Linux 6.2 User Guide

An alternate method is to automate this procedure by using a script to extract the iLO's certificate
and add it to the HP SIM trusted certificate list. The following is an example of a script that
accepts a series of iLO certificates and adds them to the HP SIM trust store.
#!/bin/sh
#
# Get certificate for each iLO passed in as an argument
# and add it to the HP SIM trust store.
#
for i in $@
do
echo |\
openssl s_client -connect ${i}:443 2>&1 | \
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | mxcert -t -
if [ $? -ne 0 ]; then
echo "Unable to retrieve certificate for $i"
exit 1
else
echo "Added certificate for $i"
fi
done
28 Security