if (serialNumber == null) {
serialNumber = BigInteger.valueOf(time);
}
if (notBefore == null) {
DateBuilder dateBuilder = new DateBuilder(time);
dateBuilder.removeDays(1);
notBefore = dateBuilder.getDate();
}
if (notAfter == null) {
DateBuilder dateBuilder = new DateBuilder(time);
dateBuilder.addYears(1);
notAfter = dateBuilder.getDate();
}
if (this.v3) {
JcaX509v3CertificateBuilder builder = new JcaX509v3CertificateBuilder(this.toX500Name(issuer), serialNumber, notBefore, notAfter, this.toX500Name(subject), keyPair.getPublic());