List of usage examples for org.bouncycastle.asn1 DERUTCTime getAdjustedTime
public String getAdjustedTime()
From source file:net.sf.portecle.crypto.X509Ext.java
License:Open Source License
/** * Get Microsoft CRL Next Publish (1.3.6.1.4.1.311.21.4) extension value as a string. * // w ww . j a v a2 s. c o m * @param bValue The octet string value * @return Extension value as a string * @throws IOException If an I/O problem occurs */ private String getMicrosoftCrlNextPublish(byte[] bValue) throws IOException { DERUTCTime time = (DERUTCTime) ASN1Primitive.fromByteArray(bValue); String date = time.getAdjustedTime(); try { date = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG) .format(time.getAdjustedDate()); } catch (ParseException e) { // Ignored } return escapeHtml(date); }