67686970717273
else if (canBeUTF8(value)) { return new DERUTF8String(value); } return new DERBMPString(value); }
102103104105106107108109110111112
break; case CONTENT_TYPE_VISIBLESTRING: contents = (DERString)new DERVisibleString(text); break; case CONTENT_TYPE_BMPSTRING: contents = (DERString)new DERBMPString(text); break; default: contents = (DERString)new DERUTF8String(text); break; }
149150151152153154155156
contents = new DERUTF8String(text); } else { contentType = CONTENT_TYPE_BMPSTRING; contents = new DERBMPString(text); } }
8788899091929394959697
break; case CONTENT_TYPE_VISIBLESTRING: contents = new DERVisibleString(text); break; case CONTENT_TYPE_BMPSTRING: contents = new DERBMPString(text); break; default: contents = new DERUTF8String(text); break; }
848586878889909192
// this is actually optional - but if you want to have control // over setting the friendly name this is the way to do it... // bagAttr.setBagAttribute( PKCSObjectIdentifiers.pkcs_9_at_friendlyName, new DERBMPString("Bouncy Primary Certificate")); return cert; }
159160161162163164165166167
// this is actually optional - but if you want to have control // over setting the friendly name this is the way to do it... // bagAttr.setBagAttribute( PKCSObjectIdentifiers.pkcs_9_at_friendlyName, new DERBMPString("Bouncy Intermediate Certificate")); return cert; }