Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.26
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.x509
Class X509V2AttributeCertificateGenerator

    java.lang.Object
      org.bouncycastle.x509.X509V2AttributeCertificateGenerator

public class X509V2AttributeCertificateGenerator
extends java.lang.Object

class to produce an X.509 Version 2 AttributeCertificate.

Constructor Summary
`X509V2AttributeCertificateGenerator()`

Method Summary
`void` | `addAttribute(X509Attribute attribute)` add an attribute
`void` | `addExtension(java.lang.String OID, boolean critical, ASN1Encodable value)` add a given extension field for the standard extensions tag (tag 3)
`void` | `addExtension(java.lang.String OID, boolean critical, byte[] value)` 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.
`X509AttributeCertificate` | `generateCertificate(java.security.PrivateKey key, java.lang.String provider)` generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing.
`X509AttributeCertificate` | `generateCertificate(java.security.PrivateKey key, java.lang.String provider, java.security.SecureRandom random)` 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.
`void` | `reset()` reset the generator
`void` | `setHolder(AttributeCertificateHolder holder)` Set the Holder of this Attribute Certificate
`void` | `setIssuer(AttributeCertificateIssuer issuer)` Set the issuer
`void` | `setIssuerUniqueId(boolean[] iui)`
`void` | `setNotAfter(java.util.Date date)`
`void` | `setNotBefore(java.util.Date date)`
`void` | `setSerialNumber(java.math.BigInteger serialNumber)` set the serial number for the certificate.
`void` | `setSignature(AlgorithmIdentifier sig)` Set the Signature inside the AttributeCertificateInfo
`void` | `setSignatureAlgorithm(java.lang.String signatureAlgorithm)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### X509V2AttributeCertificateGenerator

    public X509V2AttributeCertificateGenerator()

Method Detail

### reset

    public void reset()

  reset the generator

### setHolder

    public void setHolder(AttributeCertificateHolder holder)

  Set the Holder of this Attribute Certificate

### setIssuer

    public void setIssuer(AttributeCertificateIssuer issuer)

  Set the issuer

### setSignature

    public void setSignature(AlgorithmIdentifier sig)

  Set the Signature inside the AttributeCertificateInfo

### setSerialNumber

    public void setSerialNumber(java.math.BigInteger serialNumber)

  set the serial number for the certificate.

### setNotBefore

    public void setNotBefore(java.util.Date date)

### setNotAfter

    public void setNotAfter(java.util.Date date)

### setSignatureAlgorithm

    public void setSignatureAlgorithm(java.lang.String signatureAlgorithm)

### addAttribute

    public void addAttribute(X509Attribute attribute)

  add an attribute

### setIssuerUniqueId

    public void setIssuerUniqueId(boolean[] iui)

### addExtension

    public void addExtension(java.lang.String OID,
                             boolean critical,
                             ASN1Encodable value)
                      throws java.io.IOException

  add a given extension field for the standard extensions tag (tag 3)

  Throws:
    `java.io.IOException`

### addExtension

    public void addExtension(java.lang.String OID,
                             boolean critical,
                             byte[] value)

  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.

### generateCertificate

    public X509AttributeCertificate generateCertificate(java.security.PrivateKey key,
                                                        java.lang.String provider)
                                                 throws java.security.NoSuchProviderException,
                                                        java.lang.SecurityException,
                                                        java.security.SignatureException,
                                                        java.security.InvalidKeyException

  generate an X509 certificate, based on the current issuer and subject, using the passed in provider for the signing.

  Throws:
    `java.security.NoSuchProviderException`
    `java.lang.SecurityException`
    `java.security.SignatureException`
    `java.security.InvalidKeyException`

### generateCertificate

    public X509AttributeCertificate generateCertificate(java.security.PrivateKey key,
                                                        java.lang.String provider,
                                                        java.security.SecureRandom random)
                                                 throws java.security.NoSuchProviderException,
                                                        java.lang.SecurityException,
                                                        java.security.SignatureException,
                                                        java.security.InvalidKeyException

  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.

  Throws:
    `java.security.NoSuchProviderException`
    `java.lang.SecurityException`
    `java.security.SignatureException`
    `java.security.InvalidKeyException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.26
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD