Examples of TrustMaterial


Examples of org.apache.commons.ssl.TrustMaterial

     * @throws CertificateException thrown if the certificates can not be decoded
     */
    @SuppressWarnings("unchecked")
    public static Collection<X509Certificate> decodeCertificate(byte[] certs) throws CertificateException {
        try {
            TrustMaterial tm = new TrustMaterial(certs);
            return tm.getCertificates();
        } catch (Exception e) {
            throw new CertificateException("Unable to decode X.509 certificates", e);
        }
    }
View Full Code Here

Examples of org.apache.commons.ssl.TrustMaterial

      // setup trustStore
      File TrustMaterial = new File(trustStoreFilePath);
      char[] trustStorePasswordPasswordInCharArray = trustStorePassword
          .toCharArray();
     
      TrustMaterial trustMaterial = new TrustMaterial(TrustMaterial,
          trustStorePasswordPasswordInCharArray);

      httpSecureProtocol.setKeyMaterial(keyMaterial);
      httpSecureProtocol.setTrustMaterial(trustMaterial);
      httpSecureProtocol.setCheckCRL(true);
View Full Code Here

Examples of org.apache.commons.ssl.TrustMaterial

     * @throws CertificateException thrown if the certificates can not be decoded
     */
    @SuppressWarnings("unchecked")
    public static Collection<X509Certificate> decodeCertificate(byte[] certs) throws CertificateException {
        try {
            TrustMaterial tm = new TrustMaterial(certs);
            return tm.getCertificates();
        } catch (Exception e) {
            throw new CertificateException("Unable to decode X.509 certificates", e);
        }
    }
View Full Code Here

Examples of org.apache.commons.ssl.TrustMaterial

     * @throws CertificateException thrown if the certificates can not be decoded
     */
    @SuppressWarnings("unchecked")
    public static Collection<X509Certificate> decodeCertificate(byte[] certs) throws CertificateException {
        try {
            TrustMaterial tm = new TrustMaterial(certs);
            return tm.getCertificates();
        } catch (Exception e) {
            throw new CertificateException("Unable to decode X.509 certificates", e);
        }
    }
View Full Code Here

Examples of org.apache.commons.ssl.TrustMaterial

        if (truststoreUrl != null) {
            char[] tsPass = null;
            if (truststorePassword != null) {
                tsPass = truststorePassword.toCharArray();
            }
            TrustMaterial tm = new KeyMaterial(truststoreUrl, tsPass);
            super.setTrustMaterial(tm);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.