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 TypeMethodDescriptionvoidaddExtension(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.voidaddExtension(String oid, boolean critical, ASN1Encodable value) Deprecated.add a given extension field for the standard extensions tag (tag 3)voidaddExtension(ASN1ObjectIdentifier oid, boolean critical, byte[] value) Deprecated.add a given extension field for the standard extensions tag (tag 3)voidaddExtension(ASN1ObjectIdentifier oid, boolean critical, ASN1Encodable value) Deprecated.add a given extension field for the standard extensions tag (tag 3)voidcopyAndAddExtension(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.voidcopyAndAddExtension(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.voidreset()Deprecated.reset the generatorvoidsetIssuerDN(X500Principal issuer) Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.voidsetIssuerDN(X509Name issuer) Deprecated.Set the issuer distinguished name - the issuer is the entity whose private key is used to sign the certificate.voidsetIssuerUniqueID(boolean[] uniqueID) Deprecated.Set the issuer unique ID - note: it is very rare that it is correct to do this.voidsetNotAfter(Date date) Deprecated.voidsetNotBefore(Date date) Deprecated.voidsetPublicKey(PublicKey key) Deprecated.voidsetSerialNumber(BigInteger serialNumber) Deprecated.set the serial number for the certificate.voidsetSignatureAlgorithm(String signatureAlgorithm) Deprecated.Set the signature algorithm.voidsetSubjectDN(X500Principal subject) Deprecated.Set the subject distinguished name.voidsetSubjectDN(X509Name subject) Deprecated.Set the subject distinguished name.voidsetSubjectUniqueID(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.
-