Example usage for org.bouncycastle.asn1.x509 CRLReason getEncoded

List of usage examples for org.bouncycastle.asn1.x509 CRLReason getEncoded

Introduction

In this page you can find the example usage for org.bouncycastle.asn1.x509 CRLReason getEncoded.

Prototype

public byte[] getEncoded() throws IOException 

Source Link

Document

Return the default BER or DER encoding for this object.

Usage

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);
    }
}