List of usage examples for org.bouncycastle.asn1.ocsp RevokedInfo getRevocationTime
public ASN1GeneralizedTime getRevocationTime()
From source file:org.jruby.ext.openssl.OCSPSingleResponse.java
License:Common Public License
@JRubyMethod(name = "revocation_time") public IRubyObject revocation_time() { Ruby runtime = getRuntime();// w ww . j a v a 2s .c o m RubyFixnum revoked = (RubyFixnum) _OCSP(runtime).getConstant("V_CERTSTATUS_REVOKED"); if (bcSingleResponse.getCertStatus().getTagNo() == (int) revoked.getLongValue()) { try { RevokedInfo revokedInfo = RevokedInfo.getInstance(DERTaggedObject.fromByteArray( bcSingleResponse.getCertStatus().getStatus().toASN1Primitive().getEncoded())); return RubyTime.newTime(runtime, revokedInfo.getRevocationTime().getDate().getTime()); } catch (Exception e) { throw newOCSPError(runtime, e); } } return runtime.getNil(); }