Examples of generateCertPath()


Examples of java.security.cert.CertificateFactory.generateCertPath()

  public static X509Certificate getCert(Certificate[] aCertificationChain)
     throws CertificateException
  {
    List certList = Arrays.asList(aCertificationChain);
    CertificateFactory certFactory = CertificateFactory.getInstance(X509_CERTIFICATE_TYPE);
    CertPath certPath = certFactory.generateCertPath(certList);
    List lista = certPath.getCertificates();
    X509Certificate cert = null;
    // --- il certificato dell'utente e' sempre il primo della catena.
    if(lista.size() > 0)
      cert = (X509Certificate) lista.get(0);
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.