use of org.openecard.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class X9FieldID method toASN1Primitive.
/**
* Produce a DER encoding of the following structure.
* <pre>
* FieldID ::= SEQUENCE {
* fieldType FIELD-ID.&id({IOSet}),
* parameters FIELD-ID.&Type({IOSet}{@fieldType})
* }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(this.id);
v.add(this.parameters);
return new DERSequence(v);
}
use of org.openecard.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class CertificateList method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(tbsCertList);
v.add(sigAlgId);
v.add(sig);
return new DERSequence(v);
}
use of org.openecard.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class DigestInfo method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(algId);
v.add(new DEROctetString(digest));
return new DERSequence(v);
}
use of org.openecard.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class Extensions method toASN1Primitive.
/**
* <pre>
* Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
*
* Extension ::= SEQUENCE {
* extnId EXTENSION.&id ({ExtensionSet}),
* critical BOOLEAN DEFAULT FALSE,
* extnValue OCTET STRING }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector vec = new ASN1EncodableVector();
Enumeration e = ordering.elements();
while (e.hasMoreElements()) {
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier) e.nextElement();
Extension ext = (Extension) extensions.get(oid);
vec.add(ext);
}
return new DERSequence(vec);
}
use of org.openecard.bouncycastle.asn1.DERSequence in project robovm by robovm.
the class CertificationRequestInfo method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(version);
v.add(subject);
v.add(subjectPKInfo);
if (attributes != null) {
v.add(new DERTaggedObject(false, 0, attributes));
}
return new DERSequence(v);
}
Aggregations