Currently in our organization we are doing SHA1 migration. I have been trying to get Certificate Signature Algorithm(PKCS 1 SHA-1 With RSA Encryption) from the Management::KeyCertificate get_certificate_list method;apparently it provides only Subject Public Key Algorithm(PKCS 1 RSA Encryption).
Is there any way i can get Certificate Signature Algorithm as well??
The following bash script will show which SSL certificate in the /Common partition contains a sha1 Signature Algorithm:
for i in /config/filestore/files_d/Common_d/certificate_d/*; do
echo "$i:"; openssl x509 -text -noout -in $i |grep 'Signature Algorithm' | grep sha1
done
Create a bash script named, say, “check_insecure_sig_algo.sh”, with the following code:
!/bin/sh
for i in /config/filestore/files_d/Common_d/certificate_d/*; do
if openssl x509 -text -noout -in $i | /bin/grep 'Signature Algorithm: sha1' 2>&1 > /dev/null
then
echo $i
fi
done