Showing results for 
Search instead for 
Did you mean: 

PKI and certificate hash

paul amaral

Hi recently we got an auditor requesting that we change the self-signed SSL on a cisco C1111-8P running IOS XE Version 17.3.4a because the SSL chain has been signed with a weak hash, in this case SHA-1.


The following certificates were part of the certificate chain sent by
the remote host, but contain hashes that are considered to be weak.
Subject             : CN=IOS-Self-Signed-Certificate-1648622865
Signature Algorithm : SHA-1 With RSA Encryption
Valid From          : Jul 06 20:51:24 2020 GMT
Valid To            : Jan 01 00:00:00 2030 GMT


I followed this link to create a PKCS-12 certificate with SHA-512, and I followed option 3, that will use OPENSSL in Linux to generate a PKCS12 cert. I modified the openssl command they gave as an example and added SHA-512.


openssl req -newkey rsa:2048 -nodes -keyout tmp.key -x509 -days 4000 -sha512 -out tmp.cer -subj
"/CN=SelfSignedCert" &> /dev/null && openssl pkcs12 -export -in tmp.cer -inkey tmp.key -out tmp.bin
-passout pass:xxxxx && openssl pkcs12 -export -out certificate.pfx -password pass:xxxxx -inkey
tmp.key -in tmp.cer && rm tmp.bin tmp.key tmp.cer && openssl base64 -in certificate.pfx


When importing the PKCS12 file to the Cisco router, it only shows SHA1 and MD5 via the command, show pki trustpoints XXXX_selfsigned status.


Trustpoint selfsigned_2:
  Issuing CA certificate configured:
    Subject Name:
    Fingerprint MD5: 3048D779 xxxxxxxxxxxxxxxxxx
    Fingerprint SHA1: FBA1BE21 xxxxxxxxxxxxxxxxxxxx
  Router General Purpose certificate configured:
    Subject Name:
    Fingerprint MD5: 3048D779 xxxxxxxxxxxxxxx
    Fingerprint SHA1: FBA1BE21 xxxxxxxxxxxxxxxxxxxxx
    Keys generated ............. Yes (General Purpose, non-exportable)
    Issuing CA authenticated ....... Yes
    Certificate request(s) ..... Yes



Looking at the SSL cert through the browser shows a SHA1 and SHA256 fingerprint. Looking at the self-signed certificate in Linux with openssl does shows SHA256,


openssl x509 -in cert.pem -noout -text -noout
Signature Algorithm: sha256WithRSAEncryption


I’m confused why the generated PKCS12 is showing one thing on the router, another on the web browser and another on the Linux server that was used to generate the cert.  Not sure how there's a discrepancy on how I'm singing the cert, with SHA256 and what the router/web browser is seeing.  I’m trying to remove SHA1 altogether and replace it with SHA256 in order for the auditors pen test to stop this so called vulnerability, BTW I know I can just turn off HTTPS server on the router, since that is the only thing using SSL,  but I wanted to at least understand and fix this problem.

TIA, Paul


1 Reply 1

paul amaral

UPDATE: So it was not looking at the actual certificate signature algorithm, this does show the correct PKCS with the correct SHA version under the details of the certificate. Although I'm still not sure why under general tab on the browser it shows SHA256 and SHA1 fingerprints when I specified SHA 256.  

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Recognize Your Peers