List of usage examples for org.bouncycastle.asn1.pkcs Attribute getEncoded
public byte[] getEncoded() throws IOException
From source file:de.carne.certmgr.store.provider.bouncycastle.BouncyCastlePKCS10Object.java
License:Open Source License
@Override public byte[][] getAttributeValues(String oid) throws IOException { Attribute[] attributes = this.pkcs10Object.getAttributes(new ASN1ObjectIdentifier(oid)); ArrayList<byte[]> values = null; if (attributes != null) { values = new ArrayList<>(attributes.length); for (Attribute attribute : attributes) { values.add(attribute.getEncoded()); }//from ww w .ja v a 2s .c o m } return (values != null ? values.toArray(new byte[values.size()][]) : null); }