Java by API/java.security.cert/X509CRL
Содержание
X509CRL: getIssuerDN()
import java.io.FileInputStream;
import java.security.cert.CertificateFactory;
import java.security.cert.X509CRL;
public class MainClass {
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();
}
}
X509CRL: getNextUpdate()
import java.io.FileInputStream;
import java.security.cert.CertificateFactory;
import java.security.cert.X509CRL;
public class MainClass {
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();
}
}
X509CRL: getSigAlgName()
import java.io.FileInputStream;
import java.security.cert.CertificateFactory;
import java.security.cert.X509CRL;
public class MainClass {
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();
}
}
X509CRL: getThisUpdate()
import java.io.FileInputStream;
import java.security.cert.CertificateFactory;
import java.security.cert.X509CRL;
public class MainClass {
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();
}
}
X509CRL: getType()
import java.io.FileInputStream;
import java.security.cert.CertificateFactory;
import java.security.cert.X509CRL;
public class MainClass {
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();
}
}
X509CRL: getVersion()
import java.io.FileInputStream;
import java.security.cert.CertificateFactory;
import java.security.cert.X509CRL;
public class MainClass {
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();
}
}