Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/pkix/src
diff options
context:
space:
mode:
authorDavid Hook <dgh@cryptoworkshop.com>2014-03-22 08:39:05 +0400
committerDavid Hook <dgh@cryptoworkshop.com>2014-03-22 08:39:05 +0400
commit424d13c8267132e3b3b61bb2681983e15a997f62 (patch)
tree75a56e91f89eea9c1cd8131192c59a72f95981ab /pkix/src
parentefba0a8666bfbbe4fdb7fd85f1812943dffacb2d (diff)
added support for ASN.1 time setting
Diffstat (limited to 'pkix/src')
-rw-r--r--pkix/src/main/java/org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkix/src/main/java/org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.java b/pkix/src/main/java/org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.java
index 69019c12..ae33009c 100644
--- a/pkix/src/main/java/org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.java
+++ b/pkix/src/main/java/org/bouncycastle/cert/jcajce/JcaX509v3CertificateBuilder.java
@@ -11,6 +11,7 @@ import javax.security.auth.x500.X500Principal;
import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo;
+import org.bouncycastle.asn1.x509.Time;
import org.bouncycastle.cert.X509v3CertificateBuilder;
/**
@@ -35,6 +36,21 @@ public class JcaX509v3CertificateBuilder
}
/**
+ * Initialise the builder using a PublicKey.
+ *
+ * @param issuer X500Name representing the issuer of this certificate.
+ * @param serial the serial number for the certificate.
+ * @param notBefore Time before which the certificate is not valid.
+ * @param notAfter Time after which the certificate is not valid.
+ * @param subject X500Name representing the subject of this certificate.
+ * @param publicKey the public key to be associated with the certificate.
+ */
+ public JcaX509v3CertificateBuilder(X500Name issuer, BigInteger serial, Time notBefore, Time notAfter, X500Name subject, PublicKey publicKey)
+ {
+ super(issuer, serial, notBefore, notAfter, subject, SubjectPublicKeyInfo.getInstance(publicKey.getEncoded()));
+ }
+
+ /**
* Initialise the builder using X500Principal objects and a PublicKey.
*
* @param issuer principal representing the issuer of this certificate.