/** * return an Attribute object from the given object. * * @param o the object we want converted. * @exception IllegalArgumentException if the object cannot be converted. */ public static Attribute getInstance( Object o) { if (o instanceof Attribute) { return (Attribute)o; } if (o != null) { return new Attribute(ASN1Sequence.getInstance(o)); } return null; }
/** * return an Attribute object from the given object. * * @param o the object we want converted. * @exception IllegalArgumentException if the object cannot be converted. */ public static Attribute getInstance( Object o) { if (o instanceof Attribute) { return (Attribute)o; } if (o != null) { return new Attribute(ASN1Sequence.getInstance(o)); } return null; }
@SuppressWarnings( { "UseOfObsoleteCollectionType", "unchecked" } ) private DERSet generateSANAttribute( GeneralNames subGeneralNames ) { if ( subGeneralNames == null ) { return new DERSet(); } Vector oids = new Vector(); Vector values = new Vector(); oids.add( X509Extensions.SubjectAlternativeName ); values.add( new X509Extension( false, new DEROctetString( subGeneralNames ) ) ); X509Extensions extensions = new X509Extensions( oids, values ); Attribute attribute = new Attribute( PKCSObjectIdentifiers.pkcs_9_at_extensionRequest, new DERSet( extensions ) ); return new DERSet( attribute ); }
/** * Create an X.509 Attribute with the type given by the passed in oid and * the value represented by an ASN.1 Set containing value. * * @param oid type of the attribute * @param value value object to go into the atribute's value set. */ public X509Attribute( String oid, ASN1Encodable value) { this.attr = new Attribute(new ASN1ObjectIdentifier(oid), new DERSet(value)); }
/** * Create an X.59 Attribute with the type given by the passed in oid and the * value represented by an ASN.1 Set containing the objects in value. * * @param oid type of the attribute * @param value vector of values to go in the attribute's value set. */ public X509Attribute( String oid, ASN1EncodableVector value) { this.attr = new Attribute(new ASN1ObjectIdentifier(oid), new DERSet(value)); }
public void addAttribute(String oid, ASN1Encodable value) { attributes.add(new Attribute(new ASN1ObjectIdentifier(oid), new DERSet(value))); }
public void addAttribute(String oid, ASN1Encodable value) { attributes.add(new Attribute(new ASN1ObjectIdentifier(oid), new DERSet(value))); }
final Attribute attribute = new Attribute(PKCSObjectIdentifiers.pkcs_9_at_extensionRequest, new DERSet(exts.toASN1Object()));
final Attribute attribute = new Attribute(PKCSObjectIdentifiers.pkcs_9_at_extensionRequest, new DERSet(exts.toASN1Object()));
final org.bouncycastle.asn1.x509.Attribute id_aa_ets_signerAttr = new org.bouncycastle.asn1.x509.Attribute(X509ObjectIdentifiers.id_at_name, new DERSet(roles)); claimedAttributes.add(id_aa_ets_signerAttr);
final Attribute attribute = new Attribute( ( DERSequence ) attributesAsn1Set.getObjectAt( i ) );
final Attribute signingAttribute = new Attribute(CMSAttributes.signingTime, new DERSet(new DERUTCTime(new Date()))); signedAttributes.add(signingAttribute);
throw new BadCertTemplateException("invalid dateOfBirth " + timeStirng); attrs.add(new Attribute(attrType, new DERSet(dateOfBirth))); continue; if (placeOfBirth != null) { ASN1Encodable attrVal = new DERUTF8String(placeOfBirth); attrs.add(new Attribute(attrType, new DERSet(attrVal))); continue; attrs.add(new Attribute(attrType, new DERSet(attrVal))); continue; attrs.add(new Attribute(attrType, new DERSet(attrVal))); attrs.add(new Attribute(attrType, new DERSet(attrVal))); attrs.add(new Attribute(attrType, new DERSet(attrVal)));
throw new BadCertTemplateException("invalid dateOfBirth " + timeStirng); attrs.add(new Attribute(attrType, new DERSet(dateOfBirth))); continue; if (placeOfBirth != null) { ASN1Encodable attrVal = new DERUTF8String(placeOfBirth); attrs.add(new Attribute(attrType, new DERSet(attrVal))); continue; attrs.add(new Attribute(attrType, new DERSet(attrVal))); continue; attrs.add(new Attribute(attrType, new DERSet(attrVal))); attrs.add(new Attribute(attrType, new DERSet(attrVal))); attrs.add(new Attribute(attrType, new DERSet(attrVal)));