Example usage for org.bouncycastle.asn1.ocsp CertID getEncoded

List of usage examples for org.bouncycastle.asn1.ocsp CertID getEncoded

Introduction

In this page you can find the example usage for org.bouncycastle.asn1.ocsp CertID 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.jruby.ext.openssl.OCSPSingleResponse.java

License:Common Public License

@JRubyMethod(name = "certid")
public IRubyObject certid(ThreadContext context) {
    Ruby runtime = context.runtime;/*w ww .ja v  a  2s. com*/
    CertID bcCertId = bcSingleResponse.getCertID();
    OCSPCertificateId rubyCertId = new OCSPCertificateId(runtime);
    try {
        rubyCertId.initialize(context, RubyString.newString(runtime, bcCertId.getEncoded()));
    } catch (IOException e) {
        throw newOCSPError(runtime, e);
    }

    return rubyCertId;
}