net.rim.device.api.crypto.certificate.status
Class CertificateStatusUtilities
java.lang.Object
net.rim.device.api.crypto.certificate.status.CertificateStatusUtilities
public class CertificateStatusUtilities
- extends Object
Provides various utility methods for working with CertificateStatus objects.
- 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.2
compareStatusCertificate
public static int compareStatusCertificate(CertificateStatus object1,
CertificateStatus object2)
- Compares two CertificateStatus objects and indicates which is more important in this context.
This method should be used when comparing multiple statuses for the same Certificate.
If the two objects and have the same status, the one that was produced most recently is considered the most important.
Otherwise,
- if the first object has a status of UNKNOWN, it is never considered more important,
- if the first object has a status of GOOD, is is considered more important unless the second object has a status of REVOKED, and
- if the first object has a status of REVOKED, it is always considered more important.
- Parameters:
status1
- the first object that should be used for the comparisonstatus2
- the second object that should be used for the comparison
- Returns:
- 1 if the first object is considered more important, 0 if the two objects are considered equally important,
and -1 if the second object is considered more important
- 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.2
compareStatusCertificateChain
public static int compareStatusCertificateChain(CertificateStatus object1,
CertificateStatus object2)
- Compares two CertificateStatus objects and indicates which is more important in this context.
This method should be used when comparing the statuses of Certificates in a chain.
If the two objects and have the same status, the one that was produced least recently is considered the most important.
Otherwise,
- if the first object has a status of UNKNOWN, it is considered more important unless the second object has a status of REVOKED,
- if the first object has a status of GOOD, is is never considered more important, and
- if the first object has a status of REVOKED, it is always considered more important.
- Parameters:
status1
- the first object that should be used for the comparisonstatus2
- the second object that should be used for the comparison
- Returns:
- 1 if the first object is considered more important, 0 if the two objects are considered equally important,
and -1 if the second object is considered more important
- 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.2
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.