Package org.bouncycastle.x509
Class X509V3CertificateGenerator
java.lang.Object
org.bouncycastle.x509.X509V3CertificateGenerator
Deprecated.
use org.bouncycastle.cert.X509v3CertificateBuilder.
class to produce an X.509 Version 3 certificate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtension
(String oid, boolean critical, byte[] value) Deprecated.add a given extension field for the standard extensions tag (tag 3) The value parameter becomes the contents of the octet string associated with the extension.void
addExtension
(String oid, boolean critical, ASN1Encodable value) Deprecated.add a given extension field for the standard extensions tag (tag 3)void
addExtension
(ASN1ObjectIdentifier oid, boolean critical, byte[] value) Deprecated.add a given extension field for the standard extensions tag (tag 3)void
addExtension
(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value) Deprecated.add a given extension field for the standard extensions tag (tag 3)void
copyAndAddExtension
(String oid, boolean critical, X509Certificate cert) Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.void
copyAndAddExtension
(ASN1ObjectIdentifier oid, boolean critical, X509Certificate cert) Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.generate
(PrivateKey key) Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider.generate
(PrivateKey key, String provider) Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing.generate
(PrivateKey key, String provider, SecureRandom random) Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing and the supplied source of randomness, if required.generate
(PrivateKey key, SecureRandom random) Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider, and the passed in source of randomness (if required).Deprecated.use generate(key, "BC")generateX509Certificate
(PrivateKey key, String provider) Deprecated.use generate()generateX509Certificate
(PrivateKey key, String provider, SecureRandom random) Deprecated.use generate()generateX509Certificate
(PrivateKey key, SecureRandom random) Deprecated.use generate(key, random, "BC")Deprecated.Return an iterator of the signature names supported by the generator.void
reset()
Deprecated.reset the generatorvoid
setIssuerDN
(X500Principal issuer) Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.void
setIssuerDN
(X509Name issuer) Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.void
setIssuerUniqueID
(boolean[] uniqueID) Deprecated.Set the issuer unique ID - note: it is very rare that it is correct to do this.void
setNotAfter
(Date date) Deprecated.void
setNotBefore
(Date date) Deprecated.void
setPublicKey
(PublicKey key) Deprecated.void
setSerialNumber
(BigInteger serialNumber) Deprecated.set the serial number for the certificate.void
setSignatureAlgorithm
(String signatureAlgorithm) Deprecated.Set the signature algorithm.void
setSubjectDN
(X500Principal subject) Deprecated.Set the subject distinguished name.void
setSubjectDN
(X509Name subject) Deprecated.Set the subject distinguished name.void
setSubjectUniqueID
(boolean[] uniqueID) Deprecated.Set the subject unique ID - note: it is very rare that it is correct to do this.
-
Constructor Details
-
X509V3CertificateGenerator
public X509V3CertificateGenerator()Deprecated.
-
-
Method Details
-
reset
public void reset()Deprecated.reset the generator -
setSerialNumber
Deprecated.set the serial number for the certificate. -
setIssuerDN
Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate. -
setIssuerDN
Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate. -
setNotBefore
Deprecated. -
setNotAfter
Deprecated. -
setSubjectDN
Deprecated.Set the subject distinguished name. The subject describes the entity associated with the public key. -
setSubjectDN
Deprecated.Set the subject distinguished name. The subject describes the entity associated with the public key. -
setPublicKey
Deprecated.- Throws:
IllegalArgumentException
-
setSignatureAlgorithm
Deprecated.Set the signature algorithm. This can be either a name or an OID, names are treated as case insensitive.- Parameters:
signatureAlgorithm
- string representation of the algorithm name.
-
setSubjectUniqueID
public void setSubjectUniqueID(boolean[] uniqueID) Deprecated.Set the subject unique ID - note: it is very rare that it is correct to do this. -
setIssuerUniqueID
public void setIssuerUniqueID(boolean[] uniqueID) Deprecated.Set the issuer unique ID - note: it is very rare that it is correct to do this. -
addExtension
Deprecated.add a given extension field for the standard extensions tag (tag 3) -
addExtension
Deprecated.add a given extension field for the standard extensions tag (tag 3) -
addExtension
Deprecated.add a given extension field for the standard extensions tag (tag 3) The value parameter becomes the contents of the octet string associated with the extension. -
addExtension
Deprecated.add a given extension field for the standard extensions tag (tag 3) -
copyAndAddExtension
public void copyAndAddExtension(String oid, boolean critical, X509Certificate cert) throws CertificateParsingException Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.- Throws:
CertificateParsingException
- if the extension cannot be extracted.
-
copyAndAddExtension
public void copyAndAddExtension(ASN1ObjectIdentifier oid, boolean critical, X509Certificate cert) throws CertificateParsingException Deprecated.add a given extension field for the standard extensions tag (tag 3) copying the extension value from another certificate.- Throws:
CertificateParsingException
- if the extension cannot be extracted.
-
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key) throws SecurityException, SignatureException, InvalidKeyException Deprecated.use generate(key, "BC")generate an X509 certificate, based on the current issuer and subject using the default provider "BC". -
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, SecureRandom random) throws SecurityException, SignatureException, InvalidKeyException Deprecated.use generate(key, random, "BC")generate an X509 certificate, based on the current issuer and subject using the default provider "BC", and the passed in source of randomness (if required). -
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, String provider) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException Deprecated.use generate()generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing. -
generateX509Certificate
public X509Certificate generateX509Certificate(PrivateKey key, String provider, SecureRandom random) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException Deprecated.use generate()generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing and the supplied source of randomness, if required. -
generate
public X509Certificate generate(PrivateKey key) throws CertificateEncodingException, IllegalStateException, NoSuchAlgorithmException, SignatureException, InvalidKeyException Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider.Note: this differs from the deprecated method in that the default provider is used - not "BC".
-
generate
public X509Certificate generate(PrivateKey key, SecureRandom random) throws CertificateEncodingException, IllegalStateException, NoSuchAlgorithmException, SignatureException, InvalidKeyException Deprecated.generate an X509 certificate, based on the current issuer and subject using the default provider, and the passed in source of randomness (if required).Note: this differs from the deprecated method in that the default provider is used - not "BC".
-
generate
public X509Certificate generate(PrivateKey key, String provider) throws CertificateEncodingException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing. -
generate
public X509Certificate generate(PrivateKey key, String provider, SecureRandom random) throws CertificateEncodingException, IllegalStateException, NoSuchProviderException, NoSuchAlgorithmException, SignatureException, InvalidKeyException Deprecated.generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing and the supplied source of randomness, if required. -
getSignatureAlgNames
Deprecated.Return an iterator of the signature names supported by the generator.- Returns:
- an iterator containing recognised names.
-