The way this is done is with a default encoder which is implemented as follows:
public class X509DefaultEntryConverter extends X509NameEntryConverter { public DERObject getConvertedValue( DERObjectIdentifier oid, String value) { if (str.length() != 0 && str.charAt(0) == '#') { return convertHexEncoded(str, 1); } if (oid.equals(EmailAddress)) { return new DERIA5String(str); } else if (canBePrintable(str)) { return new DERPrintableString(str); } else if (canBeUTF8(str)) { return new DERUTF8String(str); } else { return new DERBMPString(str); } } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|