net.rim.device.api.crypto.certificate.wtls
Class WTLSCertificate

java.lang.Object
  extended by net.rim.device.api.crypto.certificate.wtls.WTLSCertificate
All Implemented Interfaces:
Certificate, Persistable

public final class WTLSCertificate
extends Object
implements Certificate, Persistable

Represents a WTLS certificate. The WTLS Certificate is defined in WAP-199-WTLS from Feb. 2000.

See Also:
Certificate
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
 
Fields inherited from interface net.rim.device.api.crypto.certificate.Certificate
DISPLAY_CA, DISPLAY_ROOT, EMAIL_ADDRESSES, IS_END_ENTITY, PROMPT_TO_TRUST_ON_IMPORT, PUBLIC_KEY_ALGORITHM_INFORMATION, STATUS_FETCH_PERMITTED, SUMMARY_TEXT
 
Constructor Summary
Category: Signed WTLSCertificate(byte[] input)
          Creates a WTLSCertificate object given a byte array containing the encoding of the certificate.
Category: Signed WTLSCertificate(byte[] input, int offset, int length)
          Creates a WTLSCertificate object given a byte array containing the encoding of the certificate.
Category: Signed WTLSCertificate(InputStream input)
          Creates a WTLSCertificate object from the given input stream.
 
Method Summary
Category: Signed  void checkCertificateChain(int position, Certificate[] chain)
          Checks to make sure that the certificate at position is valid within the chain.
Category: Signed  boolean equals(Object other)
          Returns true if and only if the certificate is equal to the object other.
Category: Signed  CertificateDisplayField[] getCustomDisplayFields()
          For a WTLS certificate, the default information provided by the displayCertificateDetails method in CertificateUtilities is sufficient.
Category: Signed  byte[] getEncoding()
          Returns the encoding of the certificate.
Category: Signed  byte[] getEncoding(int field)
          Returns the encoding of the field from the certificate.
Category: Signed  CertificateExtension getExtension(OID oid)
          Returns an extension with the given OID associated with this certificate.
Category: Signed  CertificateExtension[] getExtensions()
          Returns all the extensions associated with this certificate.
Category: Signed  CertificateExtension[] getExtensions(boolean criticalBit)
          Returns all the extensions associated with this certificate that have their critical bit set to the value of criticalBit.
Category: Signed  Object getInformation(long id, Object param, Object defaultValue)
          Retrieves generic information about the certificate.
Category: Signed  DistinguishedName getIssuer()
          Returns a DistinguishedName (WTLSDistinguishedName) object, representing the issuer of this certificate.
Category: Signed  long getNotAfter()
          Returns the date on which this certificate will expire.
Category: Signed  long getNotBefore()
          Returns the date on which this certificate will become valid.
Category: Signed  PublicKey getPublicKey()
          Extracts the subject's public key.
Category: Signed  String getPublicKeyAlgorithm()
          Returns a string representing the intended use of the public key.
Category: Signed  byte[] getSerialNumber()
          Returns a byte array containing the serial number of the certificate.
Category: Signed  String getSignatureAlgorithm()
          Returns a string representing the signature algorithm used to sign this certificate.
Category: Signed  CertificateStatus getStatus()
          Retrieves the CertificateStatus for this certificate object.
Category: Signed  DistinguishedName getSubject()
          Returns a DistinguishedName (WTLSDistinguishedName) object, representing the subject name this certificate (in different representations).
Category: Signed  String getSubjectFriendlyName()
          Returns a human-readable string version of the name of the subject of this certificate.
Category: Signed  String getType()
          Returns the type of this certificate - "WTLS".
Category: Signed  int getVersion()
          Returns the version of the certificate we have parsed.
Category: Signed  int hashCode()
          Returns a hash code value for the object.
Category: Signed  boolean isCA()
          Returns true if the certificate is of a certificate authority.
Category: Signed  boolean isRoot()
          Returns true if the certificate is self signed.
Category: Signed  boolean isValid()
          Check that this certificate is valid, using the current date and time as the time reference.
Category: Signed  boolean isValid(long date)
          Check that this certificate is valid, using date as the time reference.
Category: Signed  int queryKeyUsage(long purpose)
          Indicates whether the key contained in this certificate may be used for the specified purpose.
Category: Signed  void setStatus(CertificateStatus status)
          Sets the current CertificateStatus for this certificate object.
Category: Signed  String toString()
          Converts the certificate to a string representation by calling CertificateUtilities.getSubjectFriendlyName().
Category: Signed  void verify()
          Verifies the certificate if the certificate is self signed.
Category: Signed  void verify(PublicKey issuerPublicKey)
          Verifies the certificate.
Category: Signed  void verify(KeyStore keystore)
          Verifies the certificate.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 



Constructor Detail

WTLSCertificate

public WTLSCertificate(byte[] input)
                throws CertificateParsingException,
                       NoSuchAlgorithmException
Creates a WTLSCertificate object given a byte array containing the encoding of the certificate.

Parameters:
input - A byte array containing the certificate data.
Throws:
CertificateParsingException - Thrown if a parsing error occurs.
NoSuchAlgorithmException - Thrown if the specified key or signature encoding algorithm is not supported.
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

WTLSCertificate

public WTLSCertificate(byte[] input,
                       int offset,
                       int length)
                throws CertificateParsingException,
                       NoSuchAlgorithmException
Creates a WTLSCertificate object given a byte array containing the encoding of the certificate.

Parameters:
input - The byte array containing the certificate bytes.
offset - The starting offset of the certificate bytes.
length - The length of the certificate in bytes.

Throws:
CertificateParsingException - Thrown if a parsing error occurs.
NoSuchAlgorithmException - Thrown if the specified key or signature encoding algorithm is not supported.
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

WTLSCertificate

public WTLSCertificate(InputStream input)
                throws CertificateParsingException,
                       NoSuchAlgorithmException
Creates a WTLSCertificate object from the given input stream.

Parameters:
input - The input stream containing the certificate data.
Throws:
CertificateParsingException - Thrown if a parsing error occurs.
NoSuchAlgorithmException - Thrown if the specified key or signature encoding algorithm is not supported.
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


Method Detail

getEncoding

public byte[] getEncoding()
Returns the encoding of the certificate.

Specified by:
getEncoding in interface Certificate
Returns:
the byte array, or null if not present.
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

getEncoding

public byte[] getEncoding(int field)
Returns the encoding of the field from the certificate.

Specified by:
getEncoding in interface Certificate
Parameters:
field - An integer that represents the field.
Returns:
the byte array, or null if not present.
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

verify

public void verify(PublicKey issuerPublicKey)
            throws CertificateVerificationException,
                   NoSuchAlgorithmException,
                   InvalidSignatureEncodingException,
                   CryptoTokenException,
                   CryptoUnsupportedOperationException
Verifies the certificate.

The function checks that the certificate was signed by issuerPublicKey.

Specified by:
verify in interface Certificate
Parameters:
issuerPublicKey - The public key of the certificate issuer.
Throws:
CertificateVerificationException - Thrown if the certificate cannot be verified.
NoSuchAlgorithmException - Thrown if the specified algorithm is not known.
InvalidSignatureEncodingException - Thrown if the specified signature is invalid.
CryptoTokenException - Thrown if an error occurs with the crypto token or crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
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

verify

public void verify(KeyStore keystore)
            throws CertificateVerificationException,
                   NoSuchAlgorithmException,
                   InvalidSignatureEncodingException,
                   NoIssuerFoundException,
                   CryptoTokenException,
                   CryptoUnsupportedOperationException
Verifies the certificate.

The function checks that the certificate was signed by at least one of the publicKeys from the given keyStore.

Specified by:
verify in interface Certificate
Parameters:
keystore - The keyStore that contains the keys.
Throws:
CertificateVerificationException - Thrown if the certificate cannot be verified.
NoSuchAlgorithmException - Thrown if the specified algorithm is not known.
InvalidSignatureEncodingException - Thrown if the specified signature is invalid.
NoIssuerFoundException - Thrown when the issuer of the certificate cannot be found.
CryptoTokenException - Thrown if an error occurs with the crypto token or crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
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

isRoot

public boolean isRoot()
Returns true if the certificate is self signed.

Specified by:
isRoot in interface Certificate
Returns:
A boolean. True if the certificate is self signed, false otherwise.
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

isCA

public boolean isCA()
Returns true if the certificate is of a certificate authority.

Specified by:
isCA in interface Certificate
Returns:
A boolean. True if the certificate is of a certificate authority. Returns false otherwise.
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

checkCertificateChain

public void checkCertificateChain(int position,
                                  Certificate[] chain)
                           throws CertificateChainTooLongException,
                                  CertificateVerificationException
Checks to make sure that the certificate at position is valid within the chain.

Specified by:
checkCertificateChain in interface Certificate
Parameters:
position - The position of this ceritificate within the chain.
chain - The array of certificates representing the certificate chain. Note that the end-entity certificate must appear at array index [0].
Throws:
CertificateChainTooLongException - Thrown if the number of certificates, before this one, in the chain is longer than the certificates policy allows.
CertificateVerificationException - Thrown if there is another problem with the chain
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

verify

public void verify()
            throws CertificateVerificationException,
                   DecodeException,
                   CryptoTokenException,
                   CryptoUnsupportedOperationException,
                   InvalidSignatureEncodingException,
                   NoSuchAlgorithmException
Verifies the certificate if the certificate is self signed.

Specified by:
verify in interface Certificate
Throws:
CertificateVerificationException - Thrown if the certificate cannot be verified.
DecodeException - Thrown if the data is improperly formatted.
CryptoTokenException - Thrown if an error occurs with the crypto token or crypto token is invalid.
CryptoUnsupportedOperationException - Thrown if a call is made to an unsupported operation.
InvalidSignatureEncodingException - Thrown if the specified signature is invalid.
NoSuchAlgorithmException - Thrown if the specified algorithm is not known.
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

getPublicKey

public PublicKey getPublicKey()
                       throws InvalidCryptoSystemException
Extracts the subject's public key.

Specified by:
getPublicKey in interface Certificate
Returns:
The public key of the subject.
Throws:
InvalidCryptoSystemException - Thrown if the crypto system used to create the key was invalid.
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

getPublicKeyAlgorithm

public String getPublicKeyAlgorithm()
Description copied from interface: Certificate
Returns a string representing the intended use of the public key. If no specific algorithm is intended for this public key, then the generic string for the public key will be returned.

Specified by:
getPublicKeyAlgorithm in interface Certificate
Returns:
A string representing the intended use of the public key or null if an error occurred.
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

getSignatureAlgorithm

public String getSignatureAlgorithm()
Description copied from interface: Certificate
Returns a string representing the signature algorithm used to sign this certificate.

Specified by:
getSignatureAlgorithm in interface Certificate
Returns:
A string representing the signature algorithm used to sign this certificate.
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

getType

public String getType()
Returns the type of this certificate - "WTLS".

Specified by:
getType in interface Certificate
Returns:
A String representing the certificate type.
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 CertificateStatus getStatus()
Retrieves the CertificateStatus for this certificate object.

Specified by:
getStatus in interface Certificate
Returns:
the current CertificateStatus stored for this certificate on the device. May be null.
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

setStatus

public void setStatus(CertificateStatus status)
               throws KeyStoreCancelException,
                      InvalidTimeException,
                      BackwardStatusException
Sets the current CertificateStatus for this certificate object.

Specified by:
setStatus in interface Certificate
Parameters:
status - the new CertificateStatus that will be set for this certificate. It is important to note that this status should not attempt to set the status backwards (i.e. from REVOKED to GOOD) and it should not allow the date of a status to be in the future.
Throws:
KeyStoreCancelException - if the user decides not to enter their KeyStore password.
InvalidTimeException - if the time of the status is set in the future.
BackwardStatusException - if the status of the certificate is being backwards (i.e. from REVOKED to GOOD ).
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

isValid

public boolean isValid()
Check that this certificate is valid, using the current date and time as the time reference. It checks that the current date is between the values returned by getNotValidBefore() and getNotValidBefore().

Specified by:
isValid in interface Certificate
Returns:
A boolean that determines if the certificate is valid.
See Also:
Certificate.verify()
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

isValid

public boolean isValid(long date)
Check that this certificate is valid, using date as the time reference.

It checks that date is between the values returned by getNotValidBefore() and getNotValidBefore().

Specified by:
isValid in interface Certificate
Parameters:
date - The specified date that determines whether or not the certificates are valid.
Returns:
A boolean that determines if the certificate is valid.
See Also:
Certificate.verify()
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

getVersion

public int getVersion()
Returns the version of the certificate we have parsed. The value returned should be 1 for this version of a WTLS certificate.

Specified by:
getVersion in interface Certificate
Returns:
An integer representing the version number.
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

getSerialNumber

public byte[] getSerialNumber()
Returns a byte array containing the serial number of the certificate. Since the WTLS identifier format is usually text, these bytes are likely a textual representation of the actual serial number. May be null.

Specified by:
getSerialNumber in interface Certificate
Returns:
A byte array containing the serial number.
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

getIssuer

public DistinguishedName getIssuer()
Returns a DistinguishedName (WTLSDistinguishedName) object, representing the issuer of this certificate.

Specified by:
getIssuer in interface Certificate
Returns:
The DistinguishedName object.
See Also:
DistinguishedName
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

getSubject

public DistinguishedName getSubject()
Returns a DistinguishedName (WTLSDistinguishedName) object, representing the subject name this certificate (in different representations).

Specified by:
getSubject in interface Certificate
Returns:
The DistinguishedName object.
See Also:
DistinguishedName
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

getNotBefore

public long getNotBefore()
Returns the date on which this certificate will become valid.

Specified by:
getNotBefore in interface Certificate
Returns:
A long that specifies when the certificate will become valid.
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

getNotAfter

public long getNotAfter()
Returns the date on which this certificate will expire.

Specified by:
getNotAfter in interface Certificate
Returns:
A long that specifies when the certificate will expire.
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

getExtension

public CertificateExtension getExtension(OID oid)
Returns an extension with the given OID associated with this certificate. This returns null since there are no extensions in a WTLS certificate.

Specified by:
getExtension in interface Certificate
Parameters:
oid - The oid with the extension.
Returns:
The CertificateExtension or null.
See Also:
OIDs
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

getExtensions

public CertificateExtension[] getExtensions()
Returns all the extensions associated with this certificate. This returns null since there are no extensions in a WTLS certificate.

Specified by:
getExtensions in interface Certificate
Returns:
The CertificateExtension[] or null.
See Also:
OIDs
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

getExtensions

public CertificateExtension[] getExtensions(boolean criticalBit)
Returns all the extensions associated with this certificate that have their critical bit set to the value of criticalBit. This returns null since there are no extensions in a WTLS certificate

Specified by:
getExtensions in interface Certificate
Parameters:
criticalBit - A boolean that is true, if all critical extensions are to be returned and set to false if all non-critical extensions are to be returned.
Returns:
An array of CertificateExtensions or null.
See Also:
OIDs
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

toString

public String toString()
Converts the certificate to a string representation by calling CertificateUtilities.getSubjectFriendlyName().

Overrides:
toString in class Object
Returns:
a string representation of the object.
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 other)
Returns true if and only if the certificate is equal to the object other. Equals test whether the two encodings are equal. other can either be a WTLSCertificate or a byte[] representing the encoding of a WTLSCertificate.

Overrides:
equals in class Object
Parameters:
other - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
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 3.6.0

hashCode

public int hashCode()
Description copied from class: Object
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.

The general contract of hashCode is:

As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.
See Also:
Object.equals(java.lang.Object), 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 3.6.0

queryKeyUsage

public int queryKeyUsage(long purpose)
Description copied from interface: Certificate
Indicates whether the key contained in this certificate may be used for the specified purpose.

Specified by:
queryKeyUsage in interface Certificate
Parameters:
purpose - A constant chosen from the KeyUsage constants indicating the purpose for which the key will be checked.
Returns:
KeyUsageResult.ALLOWED Thrown if the subject public key may be used for the specified purpose.
KeyUsageResult.NOT_ALLOWED Thrown if the subject public key may not be used for the specified purpose.
KeyUsageResult.UNSPECIFIED Thrown if it is unspecified whether the subject public key may be used for this purpose.
See Also:
KeyUsageResult
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

getSubjectFriendlyName

public String getSubjectFriendlyName()
Returns a human-readable string version of the name of the subject of this certificate. This string could be used for display purposes, for example. By default, this method returns the results of CertificateUtilities.getSubjectFriendlyName(), which produces a friendly string using elements of the subject distinguished name. May be null.

Specified by:
getSubjectFriendlyName in interface Certificate
Returns:
A String representing the subject name. May be null.
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

getCustomDisplayFields

public CertificateDisplayField[] getCustomDisplayFields()
For a WTLS certificate, the default information provided by the displayCertificateDetails method in CertificateUtilities is sufficient. There are no custom display fields to return. So returns null.

Specified by:
getCustomDisplayFields in interface Certificate
Returns:
An array of CertificateDisplayField objects containing label/value pairs for the information that is to be shown in the dialog, or null if no custom information should be displayed
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

getInformation

public Object getInformation(long id,
                             Object param,
                             Object defaultValue)
Description copied from interface: Certificate
Retrieves generic information about the certificate.

Specified by:
getInformation in interface Certificate
Parameters:
id - the id of the data to retrieve
param - a parameter that may be used to determine what information to return
defaultValue - a default value that should be returned if the certificate does not recognize the id.
Returns:
information about the certificate matching the id and param
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





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal