SHOW Signed
 

net.rim.device.api.crypto.certificate.x509
Class PKCS10CertificateRequest

java.lang.Object
  |
  +--net.rim.device.api.crypto.certificate.x509.PKCS10CertificateRequest

public class PKCS10CertificateRequest
extends Object

Implements the PKCS10 ( v1.7 from May 2000 ) certificate request syntax standard.

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

Constructor Summary
 Category: Signed PKCS10CertificateRequest(PublicKey publicKey, X509DistinguishedName name, SignatureSigner signer)
          Constructs a new X509CertificateRequest object.
 
Method Summary
 Category: Signed  void addExtension(CertificateExtension extension)
          Adds an extension to be included in the certificate request.
 Category: Signed  String getCSRFormat()
          Encodes the certificate request and returns the encoded result in the format of a csr file.
 Category: Signed  byte[] getEncoded()
          Encodes the certificate request and returns the encoded result.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PKCS10CertificateRequest

public PKCS10CertificateRequest(PublicKey publicKey,
                                X509DistinguishedName name,
                                SignatureSigner signer)
Constructs a new X509CertificateRequest object.

Parameters:
publicKey - The public key to request a certificate of.
name - The distinguished name that identifies this public key.
signer - The signature signer to sign this request with.
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

addExtension

public void addExtension(CertificateExtension extension)
Adds an extension to be included in the certificate request.

Parameters:
extension - The certifcate extension.
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.

getCSRFormat

public String getCSRFormat()
                    throws NoSuchAlgorithmException,
                           InvalidKeyEncodingException,
                           CryptoTokenException
Encodes the certificate request and returns the encoded result in the format of a csr file. This format is along the lines of "-----BEGIN NEW CERTIFICATE REQUEST----" followed by the base64'ed version of the cert request, and ending with "-----END NEW CERTIFICATE REQUEST-----".

Returns:
The csr file encoding returned as a string.
Throws:
NoSuchAlgorithmException - Thrown if the specified algorithm is invalid.
InvalidKeyEncodingException - Thrown if the key is incorrectly formatted.
CryptoTokenException - Thrown if an error occurs with the crypto token or the crypto token is invalid.
Since:
JDE 3.7.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.

getEncoded

public byte[] getEncoded()
                  throws IOException,
                         NoSuchAlgorithmException,
                         InvalidKeyEncodingException,
                         CryptoTokenException
Encodes the certificate request and returns the encoded result.

Returns:
The encoding returned as a byte array.
Throws:
IOException - Thrown in an IO error occurs
NoSuchAlgorithmException - Thrown if the specified algorithm is invalid.
InvalidKeyEncodingException - Thrown if the key is incorrectly formatted.
CryptoTokenException - Thrown if an error occurs with the crypto token or the crypto token is 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.



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.