|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.cert.AttributeCertificateGenerator
public class AttributeCertificateGenerator
This class represents an attribute certificate generator.
Field Summary | |
---|---|
private org.bouncycastle.x509.X509Attribute |
attributes
|
static String |
DEFAULT_SIGNATURE_ALGORITHM
Default signature algorithm. |
private X500Principal |
holder
|
private X509Certificate |
issuerCertificate
|
private PrivateKey |
issuerPrivateKey
|
private Date |
notAfter
|
private Date |
notBefore
|
private String |
provider
|
private BigInteger |
serialNumber
|
private String |
signatureAlgorithm
|
Constructor Summary | |
---|---|
AttributeCertificateGenerator()
Creates an AttributeCertificateGenerator with the current security provider and
"SHA1WithRSAEncryption" as default signature algorithm. |
|
AttributeCertificateGenerator(String provider)
Creates an AttributeCertificateGenerator with security provider and
"SHA1WithRSAEncryption" as default signature algorithm. |
|
AttributeCertificateGenerator(String provider,
String signatureAlgorithm)
Creates an AttributeCertificateGenerator with security provider and signature
algorithm. |
Method Summary | |
---|---|
AttributeCertificate |
generate()
Generates an AttributeCertificate . |
AttributeCertificateGenerator |
notValidAfter(Date date)
Sets the not valid after date of the generated AttributeCertificate . |
AttributeCertificateGenerator |
notValidBefore(Date date)
Sets the not valid before date of the generated AttributeCertificate . |
AttributeCertificateGenerator |
reset()
Resets all inputs. |
AttributeCertificateGenerator |
withAttribute(Attribute attribute)
Sets the attribute of the generated AttributeCertificate . |
AttributeCertificateGenerator |
withHolder(X500Principal principal)
Sets the holder of the generated AttributeCertificate . |
AttributeCertificateGenerator |
withIssuer(X509Certificate certificate,
PrivateKey key)
Sets the issuer credentials needed to generate the AttributeCertificate . |
AttributeCertificateGenerator |
withSerialNumber(BigInteger serial)
Sets the serial number of the generated AttributeCertificate . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_SIGNATURE_ALGORITHM
"SHA1WithRSA"
private final String provider
private final String signatureAlgorithm
private X500Principal holder
private X509Certificate issuerCertificate
private PrivateKey issuerPrivateKey
private Date notBefore
private Date notAfter
private BigInteger serialNumber
private org.bouncycastle.x509.X509Attribute attributes
Constructor Detail |
---|
public AttributeCertificateGenerator()
AttributeCertificateGenerator
with the current security provider and
"SHA1WithRSAEncryption" as default signature algorithm.
public AttributeCertificateGenerator(String provider)
AttributeCertificateGenerator
with security provider and
"SHA1WithRSAEncryption" as default signature algorithm.
provider
- a JCE provider.public AttributeCertificateGenerator(String provider, String signatureAlgorithm)
AttributeCertificateGenerator
with security provider and signature
algorithm.
provider
- a JCE provider.signatureAlgorithm
- a JCE signature algorithm.Method Detail |
---|
public AttributeCertificateGenerator reset()
public AttributeCertificateGenerator withHolder(X500Principal principal)
AttributeCertificate
.
principal
- X509Attribute
.
public AttributeCertificateGenerator notValidAfter(Date date)
AttributeCertificate
.
date
- a Date
.
public AttributeCertificateGenerator notValidBefore(Date date)
AttributeCertificate
.
date
- a Date
.
public AttributeCertificateGenerator withSerialNumber(BigInteger serial)
AttributeCertificate
.
serial
- a BigInteger
.
public AttributeCertificateGenerator withIssuer(X509Certificate certificate, PrivateKey key)
AttributeCertificate
.
key
- the PrivateKey
of the issuer.certificate
- the public key X509Certificate
.
public AttributeCertificateGenerator withAttribute(Attribute attribute)
AttributeCertificate
.
attribute
- the attribute to set, must not be null
.
public AttributeCertificate generate() throws CertificateEncodingException, InvalidKeyException, NoSuchProviderException, SignatureException, NoSuchAlgorithmException, IOException
AttributeCertificate
.
NoSuchAlgorithmException
- indicates that a requested algorithm is missing.
SignatureException
- indicates a problem in the signature.
NoSuchProviderException
- indicates that the requested provider doesn't exist.
InvalidKeyException
- indicates an invalid key.
IOException
- indicates a problem of reading the issuer name.
CertificateEncodingException
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PERMIS Role Based Access Control 0.4.0 (Build 15)
2009/05/20 08:14:59
Copyright (c) 2002-2007 Ergon Informatik AG