Forum Discussion
command to find the SHA algorithm used in SSL certificate
Hello All, I'm working to find whether SHA1 or SHA2 algorithm being used int the SSL certificate of an application installed int the load balancer.
Is there any command to find the type of algorithm (SH 1 or SHA2) used in SSL certificate in LTM?
Thanks in advance for your help.
Regards, Thiyagu
5 Replies
- Kevin_Stewart
Employee
Here's a quick script I put together:
!/bin/bash for c in `ls --format single-column /config/filestore/files_d/Common_d/certificate_d/`; do arr=($(openssl x509 -noout -text -in /config/filestore/files_d/Common_d/certificate_d/${c} |grep -E "sha1")) if [ -n "${arr[2]}" ] then echo ${c} fi doneThis will list all of the certificates in the Common partition that use SHA1
- Thiyagu_163984
Nimbostratus
Thanks a lot Kevin for your reply.
The provided script will be helpful. In addition to that can you please share command through which I can find out SHA algorithm of installed certificate in LTM.
Regards, Thiyagu
- Samir_Jha_52506
Noctilucent
Hi, Kavin script is very nice & you can automate also. Let me know if any question
openssl x509 -noout -text -in /config/filestore/files_d/Common_d/certificate_d/xyz.crt | grep -E "sha1" - Kevin_Stewart
Employee
If you just want to show the SHA algorithm for all of the installed certs, take the "1" off of the end of the "SHA" in the grep statement:
arr=($(openssl x509 -noout -text -in /config/filestore/files_d/Common_d/certificate_d/${c} |grep -E "sha")) - Thiyagu_163984
Nimbostratus
Hi Kevin, Just to ensure this script will not cause any adverse affect to LTM.
- How to stop/delete this script from the system?
- Does this script consume lot of memory while execution?
Regards, Thiyagu
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com