docs: void addCACertificateToTrustStore(Certificate caCert, String alias) throws InvalidArgumentException, CryptoException {
  
          if (alias == null || alias.isEmpty()) {
              throw new InvalidArgumentException("You must assign an alias to a certificate when adding to the trust store.");
          }
  
          if (caCert == null) {
              throw new InvalidArgumentException("Certificate cannot be null.");
          }
  
          try {
              if (config.extraLogLevel(10)) {
                  if (null != diagnosticFileDumper) {
                      logger.trace(format("Adding cert to trust store. alias: %s. certificate:", alias) + diagnosticFileDumper.createDiagnosticFile(alias + "cert: " + caCert.toString()));
                  }
              }
              synchronized (certificateSet) {
                  if (certificateSet.contains(alias)) {
                      return;
                  }
  
                  getTrustStore().setCertificateEntry(alias, caCert);
                  certificateSet.add(alias);
  
              }
          } catch (KeyStoreException e) {
              String emsg = "Unable to add CA certificate to trust store. Error: " + e.getMessage();
              logger.error(emsg, e);
              throw new CryptoException(emsg, e);
          }
      }