List of usage examples for org.bouncycastle.asn1.x509 CRLReason getEncoded
public byte[] getEncoded() throws IOException
From source file:org.xipki.pki.ca.server.impl.X509Ca.java
License:Open Source License
private static Extension createReasonExtension(final int reasonCode) { CRLReason crlReason = CRLReason.lookup(reasonCode); try {// w w w. j a v a2 s . c om return new Extension(Extension.reasonCode, false, crlReason.getEncoded()); } catch (IOException ex) { throw new IllegalArgumentException("error encoding reason: " + ex.getMessage(), ex); } }