use of org.openecard.bouncycastle.asn1.ASN1EncodableVector 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.ASN1EncodableVector 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);
}
use of org.openecard.bouncycastle.asn1.ASN1EncodableVector in project robovm by robovm.
the class EncryptedPrivateKeyInfo method toASN1Primitive.
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* EncryptedPrivateKeyInfo ::= SEQUENCE {
* encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
* encryptedData EncryptedData
* }
*
* EncryptedData ::= OCTET STRING
*
* KeyEncryptionAlgorithms ALGORITHM-IDENTIFIER ::= {
* ... -- For local profiles
* }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(algId);
v.add(data);
return new DERSequence(v);
}
use of org.openecard.bouncycastle.asn1.ASN1EncodableVector in project robovm by robovm.
the class IssuerAndSerialNumber method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(name);
v.add(certSerialNumber);
return new DERSequence(v);
}
use of org.openecard.bouncycastle.asn1.ASN1EncodableVector in project robovm by robovm.
the class PBES2Algorithms method getASN1Primitive.
public ASN1Primitive getASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
ASN1EncodableVector subV = new ASN1EncodableVector();
v.add(objectId);
subV.add(func);
subV.add(scheme);
v.add(new DERSequence(subV));
return new DERSequence(v);
}
Aggregations