PKCS12BagAttributeCarrier bagAttr = (PKCS12BagAttributeCarrier)privateKey; bagAttr.setBagAttribute( MicrosoftObjectIdentifiers.microsoft.branch("17").branch("1"), new DERBMPString("ECDSA_P256#Microsoft Software key Service Provider"));
new DERBMPString("Eric's Key")); bagAttr.setBagAttribute( PKCSObjectIdentifiers.pkcs_9_at_localKeyId,
break; case CONTENT_TYPE_BMPSTRING: contents = new DERBMPString(text); break; default:
break; case CONTENT_TYPE_BMPSTRING: contents = new DERBMPString(text); break; default:
new DERBMPString("Eric's Key")); bagAttr.setBagAttribute( PKCSObjectIdentifiers.pkcs_9_at_localKeyId,
new DERBMPString("Bouncy Primary Certificate"));
/** * Return a BMP String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. * @return a DERBMPString instance. */ public static DERBMPString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERBMPString) { return getInstance(o); } else { return new DERBMPString(ASN1OctetString.getInstance(o).getOctets()); } }
new DERBMPString("Bouncy Intermediate Certificate"));
/** * return a BMP String from a tagged object. * * @param obj the tagged object holding the object we want * @param explicit true if the object is meant to be explicitly * tagged false otherwise. * @exception IllegalArgumentException if the tagged object cannot * be converted. */ public static DERBMPString getInstance( ASN1TaggedObject obj, boolean explicit) { ASN1Primitive o = obj.getObject(); if (explicit || o instanceof DERBMPString) { return getInstance(o); } else { return new DERBMPString(ASN1OctetString.getInstance(o).getOctets()); } }
if (nm == null || !nm.getString().equals(name)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(name)); kSeq.add(new DERSet(new DERBMPString(name))); if (nm == null || !nm.getString().equals(name)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(name)); fSeq.add(new DERSet(new DERBMPString(name))); if (nm == null || !nm.getString().equals(certId)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(certId)); fSeq.add(new DERSet(new DERBMPString(certId)));
if (nm == null || !nm.getString().equals(name)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(name)); kSeq.add(new DERSet(new DERBMPString(name))); if (nm == null || !nm.getString().equals(name)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(name)); fSeq.add(new DERSet(new DERBMPString(name))); if (nm == null || !nm.getString().equals(certId)) bagAttrs.setBagAttribute(pkcs_9_at_friendlyName, new DERBMPString(certId)); fSeq.add(new DERSet(new DERBMPString(certId)));
return DERBitString.fromInputStream(defIn.getRemaining(), defIn); case BMP_STRING: return new DERBMPString(getBMPCharBuffer(defIn)); case BOOLEAN: return ASN1Boolean.fromOctetString(getBuffer(defIn, tmpBuffers));
return ASN1BitString.fromInputStream(defIn.getRemaining(), defIn); case BMP_STRING: return new DERBMPString(getBMPCharBuffer(defIn)); case BOOLEAN: return ASN1Boolean.fromOctetString(getBuffer(defIn, tmpBuffers));