docs: public static SSLSocketFactory getSSLSocketFactory(String certificateString) throws CertificateException,
        KeyStoreException, IOException, NoSuchAlgorithmException, UnrecoverableKeyException, KeyManagementException {
      byte[] certBytes = parseDERFromPEM(certificateString, CERT_START, CERT_END);
  
      X509Certificate cert = generateCertificateFromDER(certBytes);
      KeyStore keystore = KeyStore.getInstance("JKS");
      keystore.load(null);
      keystore.setCertificateEntry("cert-alias", cert);
  
      TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
      tmf.init(keystore);
      TrustManager[] tm = tmf.getTrustManagers();
      SSLContext context = SSLContext.getInstance("TLS");
  
      context.init(null, tm, null);
  
      return context.getSocketFactory();
    }