SHOW Signed
 

net.rim.device.api.crypto.certificate
Class CertificateStatus

java.lang.Object
  |
  +--net.rim.device.api.crypto.certificate.CertificateStatus
All Implemented Interfaces:
Persistable, Persistable

public final class CertificateStatus
extends Object
implements Persistable

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

Since:
JDE 3.6.0
See Also:
Certificate, RevocationReason, CertificateFactory

Field Summary
 Category: Signed static int GOOD
          Represents the status: Good.
 Category: Signed static int REVOKED
          Represents the status: Revoked.
 Category: Signed static int UNKNOWN
          Represents the status: Unknown.
 
Constructor Summary
 Category: Signed CertificateStatus()
          Creates a CertificateStatus object with UNKNOWN status.
 Category: Signed CertificateStatus(int status, long producedAt, long thisUpdate, long nextUpdate, long revocationDate)
          Creates a CertificateStatus object with the given parameters.
 Category: Signed CertificateStatus(int status, long producedAt, long thisUpdate, long nextUpdate, long revocationDate, int revocationReason)
          Creates a CertificateStatus object with the given parameters.
 
Method Summary
 Category: Signed  int compare(CertificateStatus status)
          Deprecated. Use CertificateStatusUtilities.compareStatusCertificate() or CertificateStatusUtilities.compareStatusCertificateChain() instead.
 Category: Signed  int compare(int status)
          Deprecated. Use CertificateStatusUtilities.compareStatusCertificate() or CertificateStatusUtilities.compareStatusCertificateChain() instead.
 Category: Signed  boolean equals(Object obj)
          Returns true if this object exactly equals the object passed into this method.
 Category: Signed  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.
 Category: Signed  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.
 Category: Signed  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.
 Category: Signed  int getRevocationReason()
          Returns an integer mapping to a description in the RevocationReason interface that describes why the certificate was revoked.
 Category: Signed  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.
 Category: Signed  int getStatus()
          Returns the status of the certificate in question, one of GOOD, UNKNOWN, or REVOKED.
 Category: Signed  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.
 Category: Signed  boolean isStale()
          Returns a boolean denoting whether the status is stale according to the current stale time on the device.
 Category: Signed  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.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GOOD

public static final int GOOD
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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Method Detail

compare

public int compare(CertificateStatus 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 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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

equals

public boolean equals(Object obj)
Returns true if this object exactly equals the object passed into this method.
Overrides:
equals in class Object
Parameters:
obj - the object to compare aginst.
Returns:
a boolean denoting whether the object is equal or not.
Since:
JDE 4.0.0
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.

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 applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.



Copyright 1999-2009 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.