Java Code Examples for org.bouncycastle.asn1.x509.CRLNumber#getInstance()

The following examples show how to use org.bouncycastle.asn1.x509.CRLNumber#getInstance() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: X509Ext.java    From keystore-explorer with GNU General Public License v3.0 6 votes vote down vote up
private String getDeltaCrlIndicatorStringValue(byte[] value) throws IOException {
	// @formatter:off

	/*
	 * deltaCRLIndicator EXTENSION ::= { SYNTAX BaseCRLNumber IDENTIFIED BY
	 * id-ce-deltaCRLIndicator }
	 *
	 * BaseCRLNumber ::= CRLNumber
	 *
	 * CRLNumber ::= ASN1Integer (0..MAX)
	 */

	// @formatter:on

	CRLNumber crlNumber = CRLNumber.getInstance(value);
	BigInteger crlNum = crlNumber.getCRLNumber();

	return HexUtil.getHexString(crlNum) + NEWLINE;
}
 
Example 2
Source File: X509Ext.java    From keystore-explorer with GNU General Public License v3.0 5 votes vote down vote up
private String getCrlNumberStringValue(byte[] value) throws IOException {
	// @formatter:off
	/* CRLNumber ::= ASN1Integer (0..MAX) */
	// @formatter:on

	StringBuilder sb = new StringBuilder();

	CRLNumber crlNumber = CRLNumber.getInstance(value);

	sb.append(HexUtil.getHexString(crlNumber.getCRLNumber()));
	sb.append(NEWLINE);

	return sb.toString();
}