For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Thiyagu_163984's avatar
Thiyagu_163984
Icon for Nimbostratus rankNimbostratus
Aug 29, 2015

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

  • 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
    
    done
    

    This will list all of the certificates in the Common partition that use SHA1

  • 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

     

  • 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"
    
  • 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"))
    
  • 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