List of usage examples for org.bouncycastle.asn1 DERBMPString getInstance
public static DERBMPString getInstance(Object obj)
From source file:com.vvote.thirdparty.ximix.util.BLSKeyStore.java
License:Apache License
private String getKeyID(Attribute[] attributes) { for (Attribute attr : attributes) { if (PKCS12SafeBag.friendlyNameAttribute.equals(attr.getAttrType())) { return DERBMPString.getInstance(attr.getAttrValues().getObjectAt(0)).getString(); }/* w w w . j av a 2 s . c om*/ } throw new IllegalStateException("No friendlyNameAttribute found."); }
From source file:net.sf.keystore_explorer.crypto.x509.X509Ext.java
License:Open Source License
private String getMsCertTypeStringValue(byte[] octets) { // @formatter:off /*// ww w . j a v a2 s . com Not much information available about that extension... 06 09 ; OBJECT_ID (9 Bytes) | 2b 06 01 04 01 82 37 14 02 | ; 1.3.6.1.4.1.311.20.2 Certificate Template Name (Certificate Type) 04 0a ; OCTET_STRING (a Bytes)# 1e 08 00 55 00 73 00 65 00 72 ; ...U.s.e.r */ // @formatter:on DERBMPString derbmpString = DERBMPString.getInstance(octets); return derbmpString.toString(); }