// Path: java-ca-lib/src/main/java/io/github/olivierlemasle/ca/ext/CertExtension.java
// public class CertExtension {
//   private final ASN1ObjectIdentifier oid;
//   private final boolean isCritical;
//   private final ASN1Encodable value;
// 
//   public CertExtension(final ASN1ObjectIdentifier oid, final boolean isCritical,
//       final ASN1Encodable value) {
//     this.oid = oid;
//     this.isCritical = isCritical;
//     this.value = value;
//   }
// 
//   public ASN1ObjectIdentifier getOid() {
//     return oid;
//   }
// 
//   public boolean isCritical() {
//     return isCritical;
//   }
// 
//   public ASN1Encodable getValue() {
//     return value;
//   }
// 
//   @Override
//   public String toString() {
//     return "Extension [" + oid + "=" + value + "]";
//   }
// 
// }


import java.math.BigInteger;
import java.time.ZonedDateTime;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import io.github.olivierlemasle.ca.ext.CertExtension;
package io.github.olivierlemasle.ca;




public interface Signer {
  public SignerWithSerial setSerialNumber(final BigInteger serialNumber);

  public SignerWithSerial setRandomSerialNumber();

  public static interface SignerWithSerial extends Signer {
    public Certificate sign();

    public SignerWithSerial setNotBefore(final ZonedDateTime notBefore);

    public SignerWithSerial setNotAfter(final ZonedDateTime notAfter);

    public SignerWithSerial validDuringYears(final int years);

// Path: java-ca-lib/src/main/java/io/github/olivierlemasle/ca/ext/CertExtension.java
// public class CertExtension {
//   private final ASN1ObjectIdentifier oid;
//   private final boolean isCritical;
//   private final ASN1Encodable value;
// 
//   public CertExtension(final ASN1ObjectIdentifier oid, final boolean isCritical,
//       final ASN1Encodable value) {
//     this.oid = oid;
//     this.isCritical = isCritical;
//     this.value = value;
//   }
// 
//   public ASN1ObjectIdentifier getOid() {
//     return oid;
//   }
// 
//   public boolean isCritical() {
//     return isCritical;
//   }
// 
//   public ASN1Encodable getValue() {
//     return value;
//   }
// 
//   @Override
//   public String toString() {
//     return "Extension [" + oid + "=" + value + "]";
//   }
// 
// }


// Path: java-ca-lib/src/main/java/io/github/olivierlemasle/ca/Signer.java
import java.math.BigInteger;
import java.time.ZonedDateTime;
import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import io.github.olivierlemasle.ca.ext.CertExtension;

package io.github.olivierlemasle.ca;




public interface Signer {
  public SignerWithSerial setSerialNumber(final BigInteger serialNumber);

  public SignerWithSerial setRandomSerialNumber();

  public static interface SignerWithSerial extends Signer {
    public Certificate sign();

    public SignerWithSerial setNotBefore(final ZonedDateTime notBefore);

    public SignerWithSerial setNotAfter(final ZonedDateTime notAfter);

    public SignerWithSerial validDuringYears(final int years);

    public SignerWithSerial addExtension(final CertExtension extension);