use of org.bouncycastle.asn1.ASN1Primitive in project robovm by robovm.
the class PolicyInformation method toASN1Primitive.
/*
* PolicyInformation ::= SEQUENCE {
* policyIdentifier CertPolicyId,
* policyQualifiers SEQUENCE SIZE (1..MAX) OF
* PolicyQualifierInfo OPTIONAL }
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(policyIdentifier);
if (policyQualifiers != null) {
v.add(policyQualifiers);
}
return new DERSequence(v);
}
use of org.bouncycastle.asn1.ASN1Primitive in project robovm by robovm.
the class SubjectPublicKeyInfo method toASN1Primitive.
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* SubjectPublicKeyInfo ::= SEQUENCE {
* algorithm AlgorithmIdentifier,
* publicKey BIT STRING }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(algId);
v.add(keyData);
return new DERSequence(v);
}
use of org.bouncycastle.asn1.ASN1Primitive in project robovm by robovm.
the class TBSCertList method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
if (version != null) {
v.add(version);
}
v.add(signature);
v.add(issuer);
v.add(thisUpdate);
if (nextUpdate != null) {
v.add(nextUpdate);
}
// Add CRLEntries if they exist
if (revokedCertificates != null) {
v.add(revokedCertificates);
}
if (crlExtensions != null) {
v.add(new DERTaggedObject(0, crlExtensions));
}
return new DERSequence(v);
}
use of org.bouncycastle.asn1.ASN1Primitive in project robovm by robovm.
the class ContentInfo method toASN1Primitive.
/**
* Produce an object suitable for an ASN1OutputStream.
* <pre>
* ContentInfo ::= SEQUENCE {
* contentType ContentType,
* content
* [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL }
* </pre>
*/
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(contentType);
if (content != null) {
v.add(new BERTaggedObject(0, content));
}
return new BERSequence(v);
}
use of org.bouncycastle.asn1.ASN1Primitive in project robovm by robovm.
the class IssuerAndSerialNumber method toASN1Primitive.
public ASN1Primitive toASN1Primitive() {
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(name);
v.add(serialNumber);
return new DERSequence(v);
}
Aggregations