private byte[] getExtensionValue(X509Certificate cert, String oid) { try { byte[] bytes = cert.getExtensionValue(oid); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
/** * Creates an object on the base of its encoded form. */ public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
/** * Returns the value of certificate extension */ private byte[] getExtensionValue(X509Certificate cert, String OID) { try { byte[] bytes = cert.getExtensionValue(OID); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
bytes = (byte[]) ASN1OctetString.getInstance().decode(bytes); BigInteger crlNumber = new BigInteger((byte[]) ASN1Integer.getInstance().decode(bytes));
@Override protected Object getDecodedObject(BerInputStream in) throws IOException { Object[] values = (Object[]) in.content; int[] oid = (int[]) values[0]; if (Arrays.equals(oid, DATA)) { if (values[1] != null) { return new ContentInfo(oid, ASN1OctetString.getInstance().decode((byte[])values[1]), in.getEncoded()); } else { return new ContentInfo((int[])values[0], null, in.getEncoded()); } } if (Arrays.equals(oid, SIGNED_DATA)) { return new ContentInfo((int[])values[0], SignedData.ASN1.decode((byte[])values[1]), in.getEncoded()); } return new ContentInfo((int[]) values[0], values[1], in.getEncoded()); } };
/** * Creates an object on the base of its encoded form. */ public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
/** * Creates an object on the base of its encoded form. */ public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
private byte[] getExtensionValue(X509Certificate cert, String oid) { try { byte[] bytes = cert.getExtensionValue(oid); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
private byte[] getExtensionValue(X509Certificate cert, String oid) { try { byte[] bytes = cert.getExtensionValue(oid); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
private byte[] getExtensionValue(X509Certificate cert, String oid) { try { byte[] bytes = cert.getExtensionValue(oid); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
/** * Creates an object on the base of its encoded form. */ public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
/** * Creates an object on the base of its encoded form. */ public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
/** * Creates an object on the base of its encoded form. */ public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
private byte[] getExtensionValue(X509Certificate cert, String oid) { try { byte[] bytes = cert.getExtensionValue(oid); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
private byte[] getExtensionValue(X509Certificate cert, String oid) { try { byte[] bytes = cert.getExtensionValue(oid); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
private byte[] getExtensionValue(X509Certificate cert, String oid) { try { byte[] bytes = cert.getExtensionValue(oid); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
/** * Returns the value of certificate extension */ private byte[] getExtensionValue(X509Certificate cert, String OID) { try { byte[] bytes = cert.getExtensionValue(OID); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
/** * Returns the value of certificate extension */ private byte[] getExtensionValue(X509Certificate cert, String OID) { try { byte[] bytes = cert.getExtensionValue(OID); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }
/** * Creates an object on the base of its encoded form. */ public static SubjectKeyIdentifier decode(byte[] encoding) throws IOException { SubjectKeyIdentifier res = new SubjectKeyIdentifier((byte[]) ASN1OctetString.getInstance().decode(encoding)); res.encoding = encoding; return res; }
/** * Returns the value of certificate extension */ private byte[] getExtensionValue(X509Certificate cert, String OID) { try { byte[] bytes = cert.getExtensionValue(OID); if (bytes == null) { return null; } return (byte[]) ASN1OctetString.getInstance().decode(bytes); } catch (IOException e) { return null; } }