Package org.bouncycastle.cert.selector
Class X509AttributeCertificateHolderSelectorBuilder
- java.lang.Object
-
- org.bouncycastle.cert.selector.X509AttributeCertificateHolderSelectorBuilder
-
public class X509AttributeCertificateHolderSelectorBuilder extends java.lang.Object
This class builds selectors according to the set criteria.
-
-
Constructor Summary
Constructors Constructor Description X509AttributeCertificateHolderSelectorBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTargetGroup(org.bouncycastle.asn1.x509.GeneralName group)
Adds a target group criterion for the attribute certificate to the target information extension criteria.void
addTargetName(org.bouncycastle.asn1.x509.GeneralName name)
Adds a target name criterion for the attribute certificate to the target information extension criteria.X509AttributeCertificateHolderSelector
build()
void
setAttributeCert(X509AttributeCertificateHolder attributeCert)
Set the attribute certificate to be matched.void
setAttributeCertificateValid(java.util.Date attributeCertificateValid)
Set the time, when the certificate must be valid.void
setHolder(AttributeCertificateHolder holder)
Sets the holder.void
setIssuer(AttributeCertificateIssuer issuer)
Sets the issuer the attribute certificate must have.void
setSerialNumber(java.math.BigInteger serialNumber)
Sets the serial number the attribute certificate must have.void
setTargetGroups(java.util.Collection names)
Adds a collection with target groups criteria.void
setTargetNames(java.util.Collection names)
Adds a collection with target names criteria.
-
-
-
Method Detail
-
setAttributeCert
public void setAttributeCert(X509AttributeCertificateHolder attributeCert)
Set the attribute certificate to be matched. Ifnull
is given any will do.- Parameters:
attributeCert
- The attribute certificate holder to set.
-
setAttributeCertificateValid
public void setAttributeCertificateValid(java.util.Date attributeCertificateValid)
Set the time, when the certificate must be valid. Ifnull
is given any will do.- Parameters:
attributeCertificateValid
- The attribute certificate validation time to set.
-
setHolder
public void setHolder(AttributeCertificateHolder holder)
Sets the holder. Ifnull
is given any will do.- Parameters:
holder
- The holder to set.
-
setIssuer
public void setIssuer(AttributeCertificateIssuer issuer)
Sets the issuer the attribute certificate must have. Ifnull
is given any will do.- Parameters:
issuer
- The issuer to set.
-
setSerialNumber
public void setSerialNumber(java.math.BigInteger serialNumber)
Sets the serial number the attribute certificate must have. Ifnull
is given any will do.- Parameters:
serialNumber
- The serialNumber to set.
-
addTargetName
public void addTargetName(org.bouncycastle.asn1.x509.GeneralName name)
Adds a target name criterion for the attribute certificate to the target information extension criteria. TheX509AttributeCertificateHolder
must contain at least one of the specified target names.Each attribute certificate may contain a target information extension limiting the servers where this attribute certificate can be used. If this extension is not present, the attribute certificate is not targeted and may be accepted by any server.
- Parameters:
name
- The name as a GeneralName (notnull
)
-
setTargetNames
public void setTargetNames(java.util.Collection names) throws java.io.IOException
Adds a collection with target names criteria. Ifnull
is given any will do.The collection consists of either GeneralName objects or byte[] arrays representing DER encoded GeneralName structures.
- Parameters:
names
- A collection of target names.- Throws:
java.io.IOException
- if a parsing error occurs.- See Also:
addTargetName(org.bouncycastle.asn1.x509.GeneralName)
-
addTargetGroup
public void addTargetGroup(org.bouncycastle.asn1.x509.GeneralName group)
Adds a target group criterion for the attribute certificate to the target information extension criteria. TheX509AttributeCertificateHolder
must contain at least one of the specified target groups.Each attribute certificate may contain a target information extension limiting the servers where this attribute certificate can be used. If this extension is not present, the attribute certificate is not targeted and may be accepted by any server.
- Parameters:
group
- The group as GeneralName form (notnull
)
-
setTargetGroups
public void setTargetGroups(java.util.Collection names) throws java.io.IOException
Adds a collection with target groups criteria. Ifnull
is given any will do.The collection consists of
GeneralName
objects orbyte[]
representing DER encoded GeneralNames.- Parameters:
names
- A collection of target groups.- Throws:
java.io.IOException
- if a parsing error occurs.- See Also:
addTargetGroup(org.bouncycastle.asn1.x509.GeneralName)
-
build
public X509AttributeCertificateHolderSelector build()
-
-