code: protected String getCertIdentifier(X509CertifiedPublicKey publicKey) throws IOException
      {
          byte[] keyId = publicKey.getSubjectKeyIdentifier();
          if (keyId != null) {
              return this.hex.encode(keyId);
          }
          return publicKey.getSerialNumber().toString() + ", " + publicKey.getIssuer().getName();
      }
docs: Return a unique identifier appropriate for a file name. If the certificate as a subject key identifier, the
  result is this encoded identifier. Else, use the concatenation of the certificate serial number and the issuer
  name.
  
  @param publicKey the certificate.
  @return a unique identifier.
  @throws java.io.IOException on error.