PKCS12BagAttributeCarrier bagAttr = (PKCS12BagAttributeCarrier)privateKey; bagAttr.setBagAttribute( MicrosoftObjectIdentifiers.microsoft.branch("17").branch("1"), new DERBMPString("ECDSA_P256#Microsoft Software key Service Provider"));
public String toString() { return getString(); }
/** * 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()); } }
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 a BMP String from the given object. * * @param obj the object we want converted. * @exception IllegalArgumentException if the object cannot be converted. * @return a DERBMPString instance, or null. */ public static DERBMPString getInstance( Object obj) { if (obj == null || obj instanceof DERBMPString) { return (DERBMPString)obj; } if (obj instanceof byte[]) { try { return (DERBMPString)fromByteArray((byte[])obj); } catch (Exception e) { throw new IllegalArgumentException("encoding error in getInstance: " + e.toString()); } } throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName()); }
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)));
new DERBMPString("Eric's Key")); bagAttr.setBagAttribute( PKCSObjectIdentifiers.pkcs_9_at_localKeyId,
/** * 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()); } }
public String toString() { return getString(); }
break; case CONTENT_TYPE_BMPSTRING: contents = new DERBMPString(text); break; default:
buf.append(indent + "BMPString(" + ((DERBMPString)obj).getString() + ") " + nl);
break; case CONTENT_TYPE_BMPSTRING: contents = new DERBMPString(text); break; default:
buf.append(indent + "BMPString(" + ((DERBMPString)obj).getString() + ") " + nl);
new DERBMPString("Eric's Key")); bagAttr.setBagAttribute( PKCSObjectIdentifiers.pkcs_9_at_localKeyId,
new DERBMPString("Bouncy Primary Certificate"));
new DERBMPString("Bouncy Intermediate Certificate"));
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));