SHOW Signed
 

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

java.lang.Object
  |
  +--net.rim.device.api.crypto.certificate.wtls.WTLSCertificate
All Implemented Interfaces:
Certificate, Persistable, 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.

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

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, 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(KeyStore keystore)
          Verifies the certificate.
 Category: Signed  void verify(PublicKey issuerPublicKey)
          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.
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.

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.
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.

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.
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

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.

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
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 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
Since:
JDE 3.6.0

Following copied from class: Object
Parameters:
obj - 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.

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.
Since:
JDE 3.6.0

Following copied from 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.

getEncoding

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

Returns:
the byte array, or null if not present.
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.

getEncoding

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

Returns:
the byte array, or null if not present.
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.

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.
Since:
JDE 3.6.0

Following copied from 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.

getExtensions

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

Returns:
The CertificateExtension[] or null.
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.

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

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.
Since:
JDE 3.6.0
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.

getInformation

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

Following copied from 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.

getIssuer

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

Returns:
The DistinguishedName object.
Since:
JDE 3.6.0
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.

getNotAfter

public long getNotAfter()
Returns the date on which this certificate will expire.
Since:
JDE 3.6.0

Following copied from 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.

getNotBefore

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

Following copied from 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.

getPublicKey

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

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

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.

Since:
JDE 3.6.0

Following copied from 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.

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.
Since:
JDE 3.6.0

Following copied from 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.

getSignatureAlgorithm

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

Since:
JDE 3.6.0

Following copied from 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.

getStatus

public CertificateStatus getStatus()
Retrieves the CertificateStatus for this certificate object
Returns:
the current CertificateStatus stored for this certificate on the device. May be null.
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.

getSubject

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

Returns:
The DistinguishedName object.
Since:
JDE 3.6.0
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.

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.
Since:
JDE 3.6.0

Following copied from 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.

getType

public String getType()
Returns the type of this certificate - "WTLS".
Since:
JDE 3.6.0

Following copied from 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.

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.
Since:
JDE 3.6.0

Following copied from 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.

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:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the Object.equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.

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
Since:
JDE 3.6.0

Following copied from 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.

isCA

public boolean isCA()
Returns true if the certificate is of a certificate authority.
Since:
JDE 3.6.0

Following copied from 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.

isRoot

public boolean isRoot()
Returns true if the certificate is self signed.
Since:
JDE 3.6.0

Following copied from 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.

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().

Returns:
A boolean that determines if the certificate is valid.
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.

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().

Parameters:
date - The specified date that determines whether or not the certificates are valid.
Returns:
A boolean that determines if the certificate is valid.
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.

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.

Since:
JDE 3.6.0

Following copied from 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.

setStatus

public void setStatus(CertificateStatus status)
               throws KeyStoreCancelException,
                      InvalidTimeException,
                      BackwardStatusException
Sets the current CertificateStatus for this certificate object.
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 ).
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.

toString

public String toString()
Converts the certificate to a string representation by calling CertificateUtilities.getSubjectFriendlyName().
Overrides:
toString in class Object
Since:
JDE 3.6.0

Following copied from 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.

verify

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

Following copied from interface: Certificate
Throws:
CertificateVerificationException - Thrown if the certificate cannot be verified.
DecodeException - Thrown if the data is improperly formatted.
InvalidSignatureEncodingException - Thrown if the specified signature is invalid.
NoSuchAlgorithmException - Thrown if the specified algorithm is not known.
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.

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.

Since:
JDE 3.6.0

Following copied from interface: Certificate
Parameters:
keyStore - The keyStore that contains the keys.
Throws:
CertificateVerificationException - Thrown if the certificate cannot be verified.
DecodeException - Thrown if the data is improperly formatted.
InvalidSignatureEncodingException - Thrown if the specified signature is invalid.
NoSuchAlgorithmException - Thrown if the specified algorithm is not known.
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.

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.

Since:
JDE 3.6.0

Following copied from interface: Certificate
Parameters:
issuerPublicKey - The public key of the certificate issuer.
Throws:
CertificateVerificationException - Thrown if the certificate cannot be verified.
DecodeException - Thrown if the data is improperly formatted.
InvalidSignatureEncodingException - Thrown if the specified signature is invalid.
NoSuchAlgorithmException - Thrown if the specified algorithm is not known.
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.



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.