class CertificateLoader {

  void applySslSocketFactory(OkHttpClient.Builder builder)
      throws FeatureException {

    try {
      MDC.put("security_context", "[security_support]");
      if (certificatePath == null) {
        logger.info("no custom certificate path supplied, using system default");
        return;
      }

      builder.sslSocketFactory(sslContext.getSocketFactory(), trustManager);
      logger.info("ok, custom socket factory and trust manager added to builder");
    } finally {
      MDC.remove("security_context");
    }
  }

    CertificateLoader(String certificatePath);

}