public String generateFingerprint ( String hashFunction ) { try { this . hashFunction = hashFunction ; org . bouncycastle . crypto . tls . Certificate chain = TlsUtils . loadCertificateChain ( certificateResources ) ; Certificate certificate = chain . getCertificateAt ( 0 ) ; return TlsUtils . fingerprint ( this . hashFunction , certificate ) ; } catch ( IOException e ) { LOGGER . error ( "Could not get local fingerprint: " + e . getMessage ( ) ) ; return "" ; } }
Gets the fingerprint of the Certificate associated to the server .