Example usage for java.security.cert CertStore getCertStoreParameters

List of usage examples for java.security.cert CertStore getCertStoreParameters

Introduction

In this page you can find the example usage for java.security.cert CertStore getCertStoreParameters.

Prototype

public final CertStoreParameters getCertStoreParameters() 

Source Link

Document

Returns the parameters used to initialize this CertStore .

Usage

From source file:MainClass.java

public static void main(String args[]) throws Exception {

    CertificateFactory cf = CertificateFactory.getInstance("X.509");
    List mylist = new ArrayList();
    for (int i = 0; i < args.length; i++) {
        FileInputStream in = new FileInputStream(args[i]);
        Certificate c = cf.generateCertificate(in);
        mylist.add(c);//from  w w w  . j av  a2 s . c  o m
    }
    CertStoreParameters cparam = new CollectionCertStoreParameters(mylist);
    CertStore cs = CertStore.getInstance("Collection", cparam);
    System.out.println(cs.getCertStoreParameters());
    System.out.println(cs.getProvider());
    System.out.println(cs.getType());

}