Provides access to a certificate's current status, as
determined by a CRL or OCSP query.
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CertificateStatus()
Creates a CertificateStatus object with UNKNOWN status.
CertificateStatus(int status,
long producedAt,
long thisUpdate,
long nextUpdate,
long revocationDate)
Creates a CertificateStatus object with the given
parameters.
CertificateStatus(int status,
long producedAt,
long thisUpdate,
long nextUpdate,
long revocationDate,
int revocationReason)
Creates a CertificateStatus object with the given
parameters.
Method Summary
int
compare(CertificateStatus status) Deprecated.Use CertificateStatusUtilities.compareStatusCertificate() or CertificateStatusUtilities.compareStatusCertificateChain() instead.
int
compare(int status) Deprecated.Use CertificateStatusUtilities.compareStatusCertificate() or CertificateStatusUtilities.compareStatusCertificateChain() instead.
boolean
equals(Object obj)
Returns true if this object exactly equals the object
passed into this method.
long
getCreationDate()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time at which this object was created on
the device.
long
getNextUpdateTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time that the next update for this
certificate status will be available.
long
getProducedAtTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time at that this update was produced at for this
certificate status.
int
getRevocationReason()
Returns an integer mapping to a description in the RevocationReason interface
that describes why the certificate was revoked.
long
getRevocationTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time at which the certificate associated
with this status was revoked.
int
getStatus()
Returns the status of the certificate in question, one of
GOOD, UNKNOWN, or REVOKED.
long
getThisUpdateTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time that this update for the
certificate status was available.
boolean
isStale()
Returns a boolean denoting whether the status is stale according to the
current stale time on the device.
boolean
isStale(long maxAge)
Returns a boolean denoting whether the status is stale according to the
current stale time on the device and the maxAge variable passed
into this method.
Represents the status: Good. Indicates that the certificate in question
has not been revoked.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
REVOKED
public static final int REVOKED
Represents the status: Revoked. Indicates that the certificate has been
revoked. More information, if available, may be obtained
from getRevocationReason().
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
UNKNOWN
public static final int UNKNOWN
Represents the status: Unknown. Indicates that the status, for one reason or another, is
unknown. For example, if the Certificate Authority or responder did not issue
the certificate in question, it would return the UNKNOWN status.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Constructor Detail
CertificateStatus
public CertificateStatus()
Creates a CertificateStatus object with UNKNOWN status.
All fields are given an empty or default value. The producedAt
date is set to the current date.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CertificateStatus
public CertificateStatus(int status,
long producedAt,
long thisUpdate,
long nextUpdate,
long revocationDate)
Creates a CertificateStatus object with the given
parameters.
Any of the parameters, except status, need not
be specified and can be null (or zero as the case may be).
Parameters:
status - The status of the certificate (one of GOOD, REVOKED, or UNKNOWN).
producedAt - The long representing the date this status (or the response containing this
status) was produced.
thisUpdate - The long representing the date at which this status was known to be correct.
nextUpdate - The long representing the date at which newer information will be available
regarding the certificate in question.
revocationDate - The long representing the date this certificate was revoked, if any.
more detailed information that can be displayed to the user.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
CertificateStatus
public CertificateStatus(int status,
long producedAt,
long thisUpdate,
long nextUpdate,
long revocationDate,
int revocationReason)
Creates a CertificateStatus object with the given
parameters.
Any of the parameters, except status, need not
be specified and can be null (or zero as the case may be).
Parameters:
status - The status of the certificate (one of GOOD, REVOKED, or UNKNOWN).
producedAt - The long representing the date this status (or the response containing this
status) was produced.
thisUpdate - The long representing the date at which this status was known to be correct.
nextUpdate - The long representing the date at which newer information will be available
regarding the certificate in question.
revocationDate - The long representing the date this certificate was revoked, if any.
revocationReason - An optional revocation reason integer that provides
more detailed information that can be displayed to the user. The revocation reason is obtained by using
the RevocationReason interface.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Deprecated.Use CertificateStatusUtilities.compareStatusCertificate() or CertificateStatusUtilities.compareStatusCertificateChain() instead.
Determines how this object's status compares to the specified object's status.
Status states are ranked in the following order, from greatest to
least:
Revoked
Good
Unknown
A given status exceeds another status if it is found higher in the list.
Parameters:
status - The CertificateStatus object to check against
Returns:
0 if the statuses are equal, -1 if status is less than this status otherwise
1 if status is greater than this status
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
compare
public int compare(int status)
Deprecated.Use CertificateStatusUtilities.compareStatusCertificate() or CertificateStatusUtilities.compareStatusCertificateChain() instead.
Determines how this object's status compares to the specified object's status.
Status states are ranked in the following order, from greatest to
least:
Revoked
Good
Unknown
A given status exceeds another status if it is found higher in the list.
Parameters:
status - The status state to check against (one of UNKNOWN, GOOD, or REVOKED ).
Returns:
0 if the statuses are equal, -1 if status is less than this status otherwise
1 if status is greater than this status
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
a boolean denoting whether the object is equal
or not.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getCreationDate
public long getCreationDate()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time at which this object was created on
the device.
Returns:
The number of milliseconds since midnight, January 1, 1970 UTC.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getNextUpdateTime
public long getNextUpdateTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time that the next update for this
certificate status will be available.
Returns:
The number of milliseconds since midnight, January 1, 1970 UTC.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getProducedAtTime
public long getProducedAtTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time at that this update was produced at for this
certificate status.
Returns:
The number of milliseconds since midnight, January 1, 1970 UTC.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getRevocationReason
public int getRevocationReason()
Returns an integer mapping to a description in the RevocationReason interface
that describes why the certificate was revoked. It returns -1 if there
was no revocation reason set.
Returns:
An integer representing the revocation reason from the RevocationReason
interface or -1 if not available.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getRevocationTime
public long getRevocationTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time at which the certificate associated
with this status was revoked.
Returns:
The number of milliseconds since midnight, January 1, 1970 UTC.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getStatus
public int getStatus()
Returns the status of the certificate in question, one of
GOOD, UNKNOWN, or REVOKED.
Returns:
An integer representing the status.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
getThisUpdateTime
public long getThisUpdateTime()
Returns the number of milliseconds since midnight, January 1, 1970 UTC
which is used to denote the time that this update for the
certificate status was available.
Returns:
The number of milliseconds since midnight, January 1, 1970 UTC.
Since:
JDE 3.6.0
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
isStale
public boolean isStale()
Returns a boolean denoting whether the status is stale according to the
current stale time on the device. That is, if the status was producedAt
a time longer than the current stale time on the device then this will return true.
Returns:
a boolean indicating if the status is stale or not.
Since:
JDE 4.0.0
See Also:
CertificateStatusManager.getStaleTime
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
isStale
public boolean isStale(long maxAge)
Returns a boolean denoting whether the status is stale according to the
current stale time on the device and the maxAge variable passed
into this method. That is, if the status was producedAt a time longer than
maxAge or the current stale time on the device then this will return true.
Parameters:
maxAge - the maximum amount of time the status should have aged before
being considered stale.
Returns:
a boolean indicating if the status is stale or not.
Since:
JDE 4.0.0
See Also:
CertificateStatusManager.getStaleTime
Category:
Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved. Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. Copyright 2002-2003 Nokia Corporation All Rights Reserved. Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.