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

java.lang.Object
  extended by 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. (RFC2986)

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

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

addExtension

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

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

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

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