code: public SslContextBuilder trustManager(InputStream trustCertCollectionInputStream) {
          try {
              return trustManager(SslContext.toX509Certificates(trustCertCollectionInputStream));
          } catch (Exception e) {
              throw new IllegalArgumentException("Input stream does not contain valid certificates.", e);
          }
      }
docs: Trusted certificates for verifying the remote endpoint's certificate. The input stream should
  contain an X.509 certificate collection in PEM format. {@code null} uses the system default.