Top Description Fields Constructors Methods
org.bouncycastle.x509

public Class X509AttributeCertStoreSelector

extends Object
implements Selector
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.Selector, java.lang.Cloneable
Imports
java.io.IOException, java.math.BigInteger, java.security.cert.CertificateExpiredException, .CertificateNotYetValidException, java.util.Collection, .Collections, .Date, .HashSet, .Iterator, .Set, org.bouncycastle.asn1.ASN1InputStream, .ASN1Primitive, .DEROctetString, org.bouncycastle.asn1.x509.Extension, .GeneralName, .Target, .TargetInformation, .Targets, org.bouncycastle.util.Selector

Deprecated

use org.bouncycastle.cert.X509AttributeCertificateSelector and org.bouncycastle.cert.X509AttributeCertificateSelectorBuilder.

This class is an Selector like implementation to select attribute certificates from a given set of criteria.
See Also
org.bouncycastle.x509.X509AttributeCertificate, org.bouncycastle.x509.X509Store

Field Summary

Modifier and TypeField and Description
private X509AttributeCertificate
attributeCert

References Deprecated X509AttributeCertificate is deprecated or references (maybe indirectly) at least one deprecated element.
private Date
private AttributeCertificateHolder
holder

References Deprecated AttributeCertificateHolder is deprecated or references (maybe indirectly) at least one deprecated element.
private AttributeCertificateIssuer
issuer

References Deprecated AttributeCertificateIssuer is deprecated or references (maybe indirectly) at least one deprecated element.
private BigInteger
private Collection<E>
private Collection<E>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addTargetGroup(GeneralName
The group as GeneralName form (not null)
group
)

Adds a target group criterion for the attribute certificate to the target information extension criteria.

public void
addTargetGroup(byte[]
a byte array containing the group in ASN.1 DER encoded form of a GeneralName
name
)

Adds a target group criterion for the attribute certificate to the target information extension criteria.

public void
addTargetName(GeneralName
The name as a GeneralName (not null)
name
)

Adds a target name criterion for the attribute certificate to the target information extension criteria.

public void
addTargetName(byte[]
a byte array containing the name in ASN.1 DER encoded form of a GeneralName
name
)

Adds a target name criterion for the attribute certificate to the target information extension criteria.

public Object

Returns:

the clone.
clone
()

Overrides java.lang.Object.clone.

Implements org.bouncycastle.util.Selector.clone.

Returns a clone of this object.

private Set<E>
public X509AttributeCertificate

Returns:

Returns the attribute certificate.
getAttributeCert
()
References Deprecated X509AttributeCertificate is deprecated or references (maybe indirectly) at least one deprecated element.

Returns the attribute certificate which must be matched.

public Date

Returns:

Returns the attributeCertificateValid.
getAttributeCertificateValid
()

Get the criteria for the validity.

public AttributeCertificateHolder

Returns:

Returns the holder.
getHolder
()
References Deprecated AttributeCertificateHolder is deprecated or references (maybe indirectly) at least one deprecated element.

Gets the holder.

public AttributeCertificateIssuer

Returns:

Returns the issuer.
getIssuer
()
References Deprecated AttributeCertificateIssuer is deprecated or references (maybe indirectly) at least one deprecated element.

Returns the issuer criterion.

public BigInteger

Returns:

Returns the serialNumber.
getSerialNumber
()

Gets the serial number the attribute certificate must have.

public Collection<E>

Returns:

The collection of target groups.
getTargetGroups
()

Gets the target groups.

public Collection<E>

Returns:

The collection of target names
getTargetNames
()

Gets the target names.

public boolean

Returns:

true if the attribute certificate can be selected, false otherwise.
match
(Object
The attribute certificate which should be checked.
obj
)

Implements org.bouncycastle.util.Selector.match.

Decides if the given attribute certificate should be selected.

public void
setAttributeCert(X509AttributeCertificate
The attribute certificate to set.
attributeCert
)
References Deprecated X509AttributeCertificate is deprecated or references (maybe indirectly) at least one deprecated element.

Set the attribute certificate to be matched.

public void
setAttributeCertificateValid(Date
The attribute certificate validation time to set.
attributeCertificateValid
)

Set the time, when the certificate must be valid.

public void
setHolder(AttributeCertificateHolder
The holder to set.
holder
)
References Deprecated AttributeCertificateHolder is deprecated or references (maybe indirectly) at least one deprecated element.

Sets the holder.

public void
setIssuer(AttributeCertificateIssuer
The issuer to set.
issuer
)
References Deprecated AttributeCertificateIssuer is deprecated or references (maybe indirectly) at least one deprecated element.

Sets the issuer the attribute certificate must have.

public void
setSerialNumber(BigInteger
The serialNumber to set.
serialNumber
)

Sets the serial number the attribute certificate must have.

public void
setTargetGroups(Collection<E>
A collection of target groups.
names
)

Adds a collection with target groups criteria.

public void
setTargetNames(Collection<E>
A collection of target names.
names
)

Adds a collection with target names criteria.

Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attributeCertback to summary
private X509AttributeCertificate attributeCert

References Deprecated

X509AttributeCertificate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

attributeCertificateValidback to summary
private Date attributeCertificateValid
holderback to summary
private AttributeCertificateHolder holder

References Deprecated

AttributeCertificateHolder is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

issuerback to summary
private AttributeCertificateIssuer issuer

References Deprecated

AttributeCertificateIssuer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

serialNumberback to summary
private BigInteger serialNumber
targetGroupsback to summary
private Collection<E> targetGroups
targetNamesback to summary
private Collection<E> targetNames

Constructor Detail

X509AttributeCertStoreSelectorback to summary
public X509AttributeCertStoreSelector()

Method Detail

addTargetGroupback to summary
public void addTargetGroup(GeneralName group)

Adds a target group criterion for the attribute certificate to the target information extension criteria. The X509AttributeCertificate 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:GeneralName

The group as GeneralName form (not null)

addTargetGroupback to summary
public void addTargetGroup(byte[] name) throws IOException

Adds a target group criterion for the attribute certificate to the target information extension criteria. The X509AttributeCertificate 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
name:byte[]

a byte array containing the group in ASN.1 DER encoded form of a GeneralName

Exceptions
IOException:
if a parsing error occurs.
addTargetNameback to summary
public void addTargetName(GeneralName name)

Adds a target name criterion for the attribute certificate to the target information extension criteria. The X509AttributeCertificate 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:GeneralName

The name as a GeneralName (not null)

addTargetNameback to summary
public void addTargetName(byte[] name) throws IOException

Adds a target name criterion for the attribute certificate to the target information extension criteria. The X509AttributeCertificate 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:byte[]

a byte array containing the name in ASN.1 DER encoded form of a GeneralName

Exceptions
IOException:
if a parsing error occurs.
cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Implements org.bouncycastle.util.Selector.clone.

Returns a clone of this object.

Returns:Object

the clone.

extractGeneralNamesback to summary
private Set<E> extractGeneralNames(Collection<E> names) throws IOException
getAttributeCertback to summary
public X509AttributeCertificate getAttributeCert()

References Deprecated

X509AttributeCertificate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns the attribute certificate which must be matched.

Returns:X509AttributeCertificate

Returns the attribute certificate.

getAttributeCertificateValidback to summary
public Date getAttributeCertificateValid()

Get the criteria for the validity.

Returns:Date

Returns the attributeCertificateValid.

getHolderback to summary
public AttributeCertificateHolder getHolder()

References Deprecated

AttributeCertificateHolder is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Gets the holder.

Returns:AttributeCertificateHolder

Returns the holder.

getIssuerback to summary
public AttributeCertificateIssuer getIssuer()

References Deprecated

AttributeCertificateIssuer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Returns the issuer criterion.

Returns:AttributeCertificateIssuer

Returns the issuer.

getSerialNumberback to summary
public BigInteger getSerialNumber()

Gets the serial number the attribute certificate must have.

Returns:BigInteger

Returns the serialNumber.

getTargetGroupsback to summary
public Collection<E> getTargetGroups()

Gets the target groups. The collection consists of GeneralName objects.

The returned collection is immutable.

Returns:Collection<E>

The collection of target groups.

See Also
setTargetGroups(Collection)
getTargetNamesback to summary
public Collection<E> getTargetNames()

Gets the target names. The collection consists of GeneralName objects.

The returned collection is immutable.

Returns:Collection<E>

The collection of target names

See Also
setTargetNames(Collection)
matchback to summary
public boolean match(Object obj)

Implements org.bouncycastle.util.Selector.match.

Decides if the given attribute certificate should be selected.

Parameters
obj:Object

The attribute certificate which should be checked.

Returns:boolean

true if the attribute certificate can be selected, false otherwise.

setAttributeCertback to summary
public void setAttributeCert(X509AttributeCertificate attributeCert)

References Deprecated

X509AttributeCertificate is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Set the attribute certificate to be matched. If null is given any will do.

Parameters
attributeCert:X509AttributeCertificate

The attribute certificate to set.

setAttributeCertificateValidback to summary
public void setAttributeCertificateValid(Date attributeCertificateValid)

Set the time, when the certificate must be valid. If null is given any will do.

Parameters
attributeCertificateValid:Date

The attribute certificate validation time to set.

setHolderback to summary
public void setHolder(AttributeCertificateHolder holder)

References Deprecated

AttributeCertificateHolder is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Sets the holder. If null is given any will do.

Parameters
holder:AttributeCertificateHolder

The holder to set.

setIssuerback to summary
public void setIssuer(AttributeCertificateIssuer issuer)

References Deprecated

AttributeCertificateIssuer is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Sets the issuer the attribute certificate must have. If null is given any will do.

Parameters
issuer:AttributeCertificateIssuer

The issuer to set.

setSerialNumberback to summary
public void setSerialNumber(BigInteger serialNumber)

Sets the serial number the attribute certificate must have. If null is given any will do.

Parameters
serialNumber:BigInteger

The serialNumber to set.

setTargetGroupsback to summary
public void setTargetGroups(Collection<E> names) throws IOException

Adds a collection with target groups criteria. If null is given any will do.

The collection consists of GeneralName objects or byte[] representing DER encoded GeneralNames.

Parameters
names:Collection<E>

A collection of target groups.

Exceptions
IOException:
if a parsing error occurs.
See Also
addTargetGroup(byte[]), addTargetGroup(GeneralName)
setTargetNamesback to summary
public void setTargetNames(Collection<E> names) throws IOException

Adds a collection with target names criteria. If null is given any will do.

The collection consists of either GeneralName objects or byte[] arrays representing DER encoded GeneralName structures.

Parameters
names:Collection<E>

A collection of target names.

Exceptions
IOException:
if a parsing error occurs.
See Also
addTargetName(byte[]), addTargetName(GeneralName)