public class CertFactory extends Object
CertFactory holds methods for creating Certificate objects and
sub classes like X509Certificate.| Constructor and Description |
|---|
CertFactory() |
| Modifier and Type | Method and Description |
|---|---|
static X509Certificate |
newEndEntityX509CertificateV3(KeyPair keyPair,
org.bouncycastle.asn1.x500.X500Name issuer,
BigInteger serial,
Date notBefore,
Date notAfter,
org.bouncycastle.asn1.x500.X500Name subject,
String signatureAlgorithm,
X509Certificate caCert)
Factory method for creating a new intermediate
X509Certificate object of version 3 of
X.509 from the given parameters that can be used as an end entity certificate. |
static X509Certificate |
newIntermediateX509CertificateV3(KeyPair keyPair,
org.bouncycastle.asn1.x500.X500Name issuer,
BigInteger serial,
Date notBefore,
Date notAfter,
org.bouncycastle.asn1.x500.X500Name subject,
String signatureAlgorithm,
X509Certificate caCert)
Factory method for creating a new intermediate
X509Certificate object of version 3 of
X.509 from the given parameters that can be used to sign other certificates. |
static X509Certificate |
newX509Certificate(PublicKey publicKey,
PrivateKey privateKey,
BigInteger serialNumber,
String subject,
String issuer,
String signatureAlgorithm,
Date start,
Date end)
Factory method for creating a new
X509Certificate object from the given parameters. |
static X509Certificate |
newX509Certificate(String type,
byte[] certificateData)
Factory method for creating a new
X509Certificate from the given certificate type and
certificate data as byte array. |
static X509Certificate |
newX509CertificateV1(KeyPair keyPair,
org.bouncycastle.asn1.x500.X500Name issuer,
BigInteger serial,
Date notBefore,
Date notAfter,
org.bouncycastle.asn1.x500.X500Name subject,
String signatureAlgorithm)
Factory method for creating a new
X509Certificate object of the first version of
X.509 from the given parameters. |
public static X509Certificate newX509Certificate(String type, byte[] certificateData) throws CertificateException
X509Certificate from the given certificate type and
certificate data as byte array.type - the certificate typecertificateData - the certificate data as byte arrayX509CertificateCertificateException - is thrown if no Provider supports a CertificateFactorySpi implementation for the
given certificate type.public static X509Certificate newX509Certificate(PublicKey publicKey, PrivateKey privateKey, BigInteger serialNumber, String subject, String issuer, String signatureAlgorithm, Date start, Date end) throws Exception
X509Certificate object from the given parameters.publicKey - the public keyprivateKey - the private keyserialNumber - the serial numbersubject - the subjectissuer - the issuersignatureAlgorithm - the signature algorithmstart - the startend - the endX509Certificate objectException - is thrown if if a security error occurpublic static X509Certificate newX509CertificateV1(KeyPair keyPair, org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, org.bouncycastle.asn1.x500.X500Name subject, String signatureAlgorithm) throws Exception
X509Certificate object of the first version of
X.509 from the given parameters.
SecurityProvider is Bouncy Castle.keyPair - the key pairissuer - X500Name representing the issuer of this certificate.serial - the serial number for the certificate.notBefore - date before which the certificate is not valid.notAfter - date after which the certificate is not valid.subject - X500Name representing the subject of this certificate.signatureAlgorithm - the signature algorithm i.e 'SHA1withRSA'X509Certificate objectException - is thrown if if a security error occurpublic static X509Certificate newIntermediateX509CertificateV3(KeyPair keyPair, org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, org.bouncycastle.asn1.x500.X500Name subject, String signatureAlgorithm, X509Certificate caCert) throws Exception
X509Certificate object of version 3 of
X.509 from the given parameters that can be used to sign other certificates.keyPair - the key pairissuer - X500Name representing the issuer of this certificate.serial - the serial number for the certificate.notBefore - date before which the certificate is not valid.notAfter - date after which the certificate is not valid.subject - X500Name representing the subject of this certificate.signatureAlgorithm - the signature algorithm i.e 'SHA1withRSA'caCert - the ca certX509Certificate objectException - is thrown if if a security error occurpublic static X509Certificate newEndEntityX509CertificateV3(KeyPair keyPair, org.bouncycastle.asn1.x500.X500Name issuer, BigInteger serial, Date notBefore, Date notAfter, org.bouncycastle.asn1.x500.X500Name subject, String signatureAlgorithm, X509Certificate caCert) throws Exception
X509Certificate object of version 3 of
X.509 from the given parameters that can be used as an end entity certificate.keyPair - the key pairissuer - X500Name representing the issuer of this certificate.serial - the serial number for the certificate.notBefore - date before which the certificate is not valid.notAfter - date after which the certificate is not valid.subject - X500Name representing the subject of this certificate.signatureAlgorithm - the signature algorithm i.e 'SHA1withRSA'caCert - the ca certX509Certificate objectException - is thrown if if a security error occurCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.