Tabnine Logo
X509CRLExtendedTrustManager
Code IndexAdd Tabnine to your IDE (free)

How to use
X509CRLExtendedTrustManager
in
org.wildfly.security.ssl

Best Java code snippets using org.wildfly.security.ssl.X509CRLExtendedTrustManager (Showing top 9 results out of 315)

origin: wildfly/wildfly

  X509TrustManager build() throws NoSuchAlgorithmException, KeyStoreException, ConfigXMLParseException {
    final String algorithm = this.algorithm != null ? this.algorithm : TrustManagerFactory.getDefaultAlgorithm();
    Provider provider = findProvider(providers, providerName, TrustManagerFactory.class, algorithm);
    if (provider == null) {
      throw xmlLog.xmlUnableToIdentifyProvider(xmlLocation, providerName, "TrustManagerFactory", algorithm);
    }
    final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(algorithm, provider);
    if (crl) {
      return new X509CRLExtendedTrustManager(trustStore, trustManagerFactory, crlStream, maxCertPath, null);
    } else {
      trustManagerFactory.init(trustStore);
    }
    for (TrustManager trustManager : trustManagerFactory.getTrustManagers()) {
      if (trustManager instanceof X509TrustManager) {
        return (X509TrustManager) trustManager;
      }
    }
    throw ElytronMessages.log.noDefaultTrustManager();
  }
}
origin: wildfly/wildfly

CertStoreParameters csp = new CollectionCertStoreParameters(getCRLs(crlStream));
CertStore store = CertStore.getInstance("Collection", csp);
params.addCertStore(store);
origin: org.wildfly.security/wildfly-elytron

  X509TrustManager build() throws NoSuchAlgorithmException, KeyStoreException, ConfigXMLParseException {
    final String algorithm = this.algorithm != null ? this.algorithm : TrustManagerFactory.getDefaultAlgorithm();
    Provider provider = findProvider(providers, providerName, TrustManagerFactory.class, algorithm);
    if (provider == null) {
      throw xmlLog.xmlUnableToIdentifyProvider(xmlLocation, providerName, "TrustManagerFactory", algorithm);
    }
    final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(algorithm, provider);
    if (crl) {
      return new X509CRLExtendedTrustManager(trustStore, trustManagerFactory, crlStream, maxCertPath, null);
    } else {
      trustManagerFactory.init(trustStore);
    }
    for (TrustManager trustManager : trustManagerFactory.getTrustManagers()) {
      if (trustManager instanceof X509TrustManager) {
        return (X509TrustManager) trustManager;
      }
    }
    throw ElytronMessages.log.noDefaultTrustManager();
  }
}
origin: org.wildfly.security/wildfly-elytron-ssl

CertStoreParameters csp = new CollectionCertStoreParameters(getCRLs(crlStream));
CertStore store = CertStore.getInstance("Collection", csp);
params.addCertStore(store);
origin: org.wildfly.security/wildfly-elytron-client

  X509TrustManager build() throws NoSuchAlgorithmException, KeyStoreException, ConfigXMLParseException {
    final String algorithm = this.algorithm != null ? this.algorithm : TrustManagerFactory.getDefaultAlgorithm();
    Provider provider = findProvider(providers, providerName, TrustManagerFactory.class, algorithm);
    if (provider == null) {
      throw xmlLog.xmlUnableToIdentifyProvider(xmlLocation, providerName, "TrustManagerFactory", algorithm);
    }
    final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(algorithm, provider);
    if (crl) {
      return new X509CRLExtendedTrustManager(trustStore, trustManagerFactory, crlStream, maxCertPath, null);
    } else {
      trustManagerFactory.init(trustStore);
    }
    for (TrustManager trustManager : trustManagerFactory.getTrustManagers()) {
      if (trustManager instanceof X509TrustManager) {
        return (X509TrustManager) trustManager;
      }
    }
    throw ElytronMessages.log.noDefaultTrustManager();
  }
}
origin: org.wildfly.security/wildfly-elytron

CertStoreParameters csp = new CollectionCertStoreParameters(getCRLs(crlStream));
CertStore store = CertStore.getInstance("Collection", csp);
params.addCertStore(store);
origin: org.jboss.eap/wildfly-client-all

  X509TrustManager build() throws NoSuchAlgorithmException, KeyStoreException, ConfigXMLParseException {
    final String algorithm = this.algorithm != null ? this.algorithm : TrustManagerFactory.getDefaultAlgorithm();
    Provider provider = findProvider(providers, providerName, TrustManagerFactory.class, algorithm);
    if (provider == null) {
      throw xmlLog.xmlUnableToIdentifyProvider(xmlLocation, providerName, "TrustManagerFactory", algorithm);
    }
    final TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(algorithm, provider);
    if (crl) {
      return new X509CRLExtendedTrustManager(trustStore, trustManagerFactory, crlStream, maxCertPath, null);
    } else {
      trustManagerFactory.init(trustStore);
    }
    for (TrustManager trustManager : trustManagerFactory.getTrustManagers()) {
      if (trustManager instanceof X509TrustManager) {
        return (X509TrustManager) trustManager;
      }
    }
    throw ElytronMessages.log.noDefaultTrustManager();
  }
}
origin: org.jboss.eap/wildfly-client-all

CertStoreParameters csp = new CollectionCertStoreParameters(getCRLs(crlStream));
CertStore store = CertStore.getInstance("Collection", csp);
params.addCertStore(store);
origin: wildfly/wildfly-core

private ValueSupplier<TrustManager> createX509CRLExtendedTrustManager(ServiceBuilder<TrustManager> serviceBuilder, OperationContext context, String algorithm, String providerName, InjectedValue<Provider[]> providersInjector, InjectedValue<KeyStore> keyStoreInjector, ModelNode crlNode) throws OperationFailedException {
  String crlPath = PATH.resolveModelAttribute(context, crlNode).asStringOrNull();
  String crlRelativeTo = RELATIVE_TO.resolveModelAttribute(context, crlNode).asStringOrNull();
  int certPath = MAXIMUM_CERT_PATH.resolveModelAttribute(context, crlNode).asInt();
  final InjectedValue<PathManager> pathManagerInjector = new InjectedValue<>();
  if (crlPath != null) {
    if (crlRelativeTo != null) {
      serviceBuilder.addDependency(PathManagerService.SERVICE_NAME, PathManager.class, pathManagerInjector);
      serviceBuilder.requires(pathName(crlRelativeTo));
    }
  }
  return () -> {
    TrustManagerFactory trustManagerFactory = createTrustManagerFactory(providersInjector.getOptionalValue(), providerName, algorithm);
    KeyStore keyStore = keyStoreInjector.getOptionalValue();
    if (crlPath != null) {
      try {
        X509CRLExtendedTrustManager trustManager = new X509CRLExtendedTrustManager(keyStore, trustManagerFactory, new FileInputStream(resolveFileLocation(crlPath, crlRelativeTo, pathManagerInjector)), certPath, null);
        return createReloadableX509CRLTrustManager(crlPath, crlRelativeTo, certPath, pathManagerInjector, trustManagerFactory, keyStore, trustManager);
      } catch (FileNotFoundException e) {
        throw ElytronSubsystemMessages.ROOT_LOGGER.unableToAccessCRL(e);
      }
    }
    return new X509CRLExtendedTrustManager(keyStore, trustManagerFactory, null, certPath, null);
  };
}
org.wildfly.security.sslX509CRLExtendedTrustManager

Javadoc

Extension to the X509TrustManager interface to support CRL verification.

Most used methods

  • <init>
    Creates a new instance.
  • getCRLs

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • String (java.lang)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Runner (org.openjdk.jmh.runner)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now