ASN1EncodableVector validity = new ASN1EncodableVector();
validity.add(startDate);
validity.add(endDate);
v.add(new DERSequence(validity));
if (subject != null)
{
v.add(subject);
}
else
{
v.add(new DERSequence());
}
v.add(subjectPublicKeyInfo);
if (issuerUniqueID != null)
{
v.add(new DERTaggedObject(false, 1, issuerUniqueID));
}
if (subjectUniqueID != null)
{
v.add(new DERTaggedObject(false, 2, subjectUniqueID));
}
if (extensions != null)
{
v.add(new DERTaggedObject(true, 3, extensions));
}
return TBSCertificate.getInstance(new DERSequence(v));
}