Example usage for java.security.cert X509CRL getVersion

List of usage examples for java.security.cert X509CRL getVersion

Introduction

In this page you can find the example usage for java.security.cert X509CRL getVersion.

Prototype

public abstract int getVersion();

Source Link

Document

Gets the version (version number) value from the CRL.

Usage

From source file:MainClass.java

public static void main(String[] args) throws Exception {
    CertificateFactory cf = CertificateFactory.getInstance("X.509");
    FileInputStream in = new FileInputStream(args[0]);
    X509CRL crl = (X509CRL) cf.generateCRL(in);
    System.out.println("type = " + crl.getType());
    System.out.println("version = " + crl.getVersion());
    System.out.println("issuer = " + crl.getIssuerDN().getName());
    System.out.println("signing algorithm = " + crl.getSigAlgName());
    System.out.println("this update = " + crl.getThisUpdate());
    System.out.println("next update = " + crl.getNextUpdate());
    in.close();//  ww  w .  j a  va  2s  .  com
}