APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.x509

public Class CRLExtensions

extends Object
Class Inheritance
Imports
java.io.IOException, .OutputStream, java.lang.reflect.Constructor, .InvocationTargetException, java.security.cert.CRLException, java.util.Collection, .Collections, .Map, .TreeMap, sun.security.util.*

This class defines the CRL Extensions. It is used for both CRL Extensions and CRL Entry Extensions, which are defined are follows:
TBSCertList  ::=  SEQUENCE  {
   version              Version OPTIONAL,   -- if present, must be v2
   signature            AlgorithmIdentifier,
   issuer               Name,
   thisUpdate           Time,
   nextUpdate           Time  OPTIONAL,
   revokedCertificates  SEQUENCE OF SEQUENCE  {
       userCertificate         CertificateSerialNumber,
       revocationDate          Time,
       crlEntryExtensions      Extensions OPTIONAL  -- if present, must be v2
   }  OPTIONAL,
   crlExtensions        [0] EXPLICIT Extensions OPTIONAL  -- if present, must be v2
}
Author
Hemma Prafullchandra

Field Summary

Modifier and TypeField and Description
private final Map<String, Extension>
private static final Class<?>[]
private boolean

Constructor Summary

AccessConstructor and Description
public
CRLExtensions()

Default constructor.

public
CRLExtensions(DerInputStream
the DerInputStream to read the Extension from, i.e. the sequence of extensions.
in
)

Create the object, decoding the values from the passed DER stream.

Method Summary

Modifier and TypeMethod and Description
public void
delete(String
the identifier string for the extension to delete.
alias
)

Delete the extension value with this alias.

public void
encode(DerOutputStream
the DerOutputStream to marshal the contents to.
out
,
boolean
the tag indicating whether this is an entry extension (false) or a CRL extension (true).
isExplicit
)

Encode the extensions in DER form to the stream.

public boolean

Returns:

true iff all the entries match that of the Other, false otherwise.
equals
(Object
the object to test for equality with this CRLExtensions.
other
)

Overrides java.lang.Object.equals.

Compares this CRLExtensions for equality with the specified object.

public Collection<Extension>

Returns:

a collection view of the extensions in this CRL.
getAllExtensions
()

Return a collection view of the extensions.

public Extension
getExtension(String
the identifier string for the extension to retrieve.
alias
)

Get the extension with this alias.

public int

Returns:

a hashcode value for this CRLExtensions
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hashcode value for this CRLExtensions.

public boolean
hasUnsupportedCriticalExtension()

Return true if a critical extension is found that is not supported, otherwise return false.

private void
private void
public void
setExtension(String
the identifier string for the extension to set.
alias
,
Extension
the extension identified by the alias.
ext
)

Set the extension value with this alias.

public String

Returns:

a string representation of this CRLExtensions.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this CRLExtensions object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space).

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

mapback to summary
private final Map<String, Extension> map
PARAMSback to summary
private static final Class<?>[] PARAMS
unsupportedCritExtback to summary
private boolean unsupportedCritExt

Constructor Detail

CRLExtensionsback to summary
public CRLExtensions()

Default constructor.

CRLExtensionsback to summary
public CRLExtensions(DerInputStream in) throws CRLException

Create the object, decoding the values from the passed DER stream.

Parameters
in:DerInputStream

the DerInputStream to read the Extension from, i.e. the sequence of extensions.

Exceptions
CRLException:
on decoding errors.

Method Detail

deleteback to summary
public void delete(String alias)

Delete the extension value with this alias.

Parameters
alias:String

the identifier string for the extension to delete.

encodeback to summary
public void encode(DerOutputStream out, boolean isExplicit)

Encode the extensions in DER form to the stream.

Parameters
out:DerOutputStream

the DerOutputStream to marshal the contents to.

isExplicit:boolean

the tag indicating whether this is an entry extension (false) or a CRL extension (true).

equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Compares this CRLExtensions for equality with the specified object. If the other object is an instanceof CRLExtensions, then all the entries are compared with the entries from this.

Parameters
other:Object

the object to test for equality with this CRLExtensions.

Returns:boolean

true iff all the entries match that of the Other, false otherwise.

Annotations
@Override
getAllExtensionsback to summary
public Collection<Extension> getAllExtensions()

Return a collection view of the extensions.

Returns:Collection<Extension>

a collection view of the extensions in this CRL.

getExtensionback to summary
public Extension getExtension(String alias)

Get the extension with this alias.

Parameters
alias:String

the identifier string for the extension to retrieve.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hashcode value for this CRLExtensions.

Returns:int

a hashcode value for this CRLExtensions

Annotations
@Override
hasUnsupportedCriticalExtensionback to summary
public boolean hasUnsupportedCriticalExtension()

Return true if a critical extension is found that is not supported, otherwise return false.

initback to summary
private void init(DerInputStream derStrm) throws CRLException
parseExtensionback to summary
private void parseExtension(Extension ext) throws CRLException
setExtensionback to summary
public void setExtension(String alias, Extension ext)

Set the extension value with this alias.

Parameters
alias:String

the identifier string for the extension to set.

ext:Extension

the extension identified by the alias.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this CRLExtensions object in the form of a set of entries, enclosed in braces and separated by the ASCII characters ", " (comma and space).

Overrides to toString method of Object.

Returns:String

a string representation of this CRLExtensions.