class DefaultCertificateClient implements CertificateClient {

  @Override
  public X509Certificate getCertificate() {
    if (x509Certificate != null) {
      return x509Certificate;
    }

    if (certSerialId == null) {
      getLogger().error("Default certificate serial id is not set. Can't " +
          "locate the default certificate for this client.");
      return null;
    }
    // Refresh the cache from file system.
    loadAllCertificates();
    if (certificateMap.containsKey(certSerialId)) {
      x509Certificate = certificateMap.get(certSerialId);
    }
    return x509Certificate;
  }

    DefaultCertificateClient(SecurityConfig securityConfig, Logger log,
      String certSerialId, String component);

}