Skip to content

Getting the IDP's X.509 Certificate Fingerprint and Algorithm

Kelvin Tay edited this page Mar 26, 2020 · 1 revision

From your IDP's metadata, you are likely to find the X.509 certificate. This can be in the DER format.

If so, to find out the Fingerprint, we can reassemble the certificate with:

cert = 'your DER string here'

headers = [
  '-----BEGIN CERTIFICATE-----',
  '-----END CERTIFICATE-----'
]
formatted = '\n'.join([headers[0]] + [cert[i:i+64] for i in range(0, len(cert), 64)] +[headers[1]])

print(formatted)

Use the output here in https://www.samltool.com/fingerprint.php to generate the fingerprint. If using SHA1, the fingerprint algorithm will be classified as http://www.w3.org/2000/09/xmldsig#sha1.