// PrivateKeyUsagePeriod ::= SEQUENCE {
// notBefore [0] GeneralizedTime OPTIONAL,
// notAfter [1] GeneralizedTime OPTIONAL }
final ASN1EncodableVector v = new ASN1EncodableVector();
if (notBefore != null) {
v.add(new DERTaggedObject(false, 0, new DERGeneralizedTime(notBefore)));
}
if (notAfter != null) {
v.add(new DERTaggedObject(false, 1, new DERGeneralizedTime(notAfter)));
}
if (v.size() == 0) {
throw new CertificateExtentionConfigurationException(
"At least one of notBefore and notAfter must be specified!");
}