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.
- See Also:
Certificate
,
RevocationReason
,
CertificateFactory
- 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:
- BlackBerry API 3.6.0
Field Summary |
|
static int |
GOOD
Represents the status: Good. |
|
static int |
REVOKED
Represents the status: Revoked. |
|
static int |
UNKNOWN
Represents the status: Unknown. |
Constructor Summary |
|
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(int status)
Deprecated. Use CertificateStatusUtilities.compareStatusCertificate() or CertificateStatusUtilities.compareStatusCertificateChain() instead. |
|
int |
compare(CertificateStatus 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. |
GOOD
public static final int GOOD
- Represents the status: Good. Indicates that the certificate in question
has not been revoked.
- See Also:
- Constant Field Values
- 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:
- BlackBerry API 3.6.0
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()
.
- See Also:
- Constant Field Values
- 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:
- BlackBerry API 3.6.0
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.
- See Also:
- Constant Field Values
- 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:
- BlackBerry API 3.6.0
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.
- 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:
- BlackBerry API 3.6.0
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.- 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:
- BlackBerry API 3.6.0
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.- 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:
- BlackBerry API 3.6.0
getStatus
public int getStatus()
- Returns the status of the certificate in question, one of
GOOD, UNKNOWN, or REVOKED.
- Returns:
- An integer representing the status.
- 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:
- BlackBerry API 3.6.0
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.
- 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:
- BlackBerry API 3.6.0
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.
- 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:
- BlackBerry API 3.6.0
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.
- 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:
- BlackBerry API 3.6.0
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.
- 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:
- BlackBerry API 3.6.0
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.
- 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:
- BlackBerry API 3.6.0
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.
- 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:
- BlackBerry API 3.6.0
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.
- 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.
- Since:
- BlackBerry API 4.0.0
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.
- 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.
- Since:
- BlackBerry API 4.0.0
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:
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 - 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:
- BlackBerry API 3.6.0
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:
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 - 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:
- BlackBerry API 3.6.0
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.
- See Also:
Boolean.hashCode()
,
Hashtable
- 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:
- BlackBerry API 4.0.0
Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.