net.rim.device.api.crypto.cms
Class CMSSigner

java.lang.Object
  extended by net.rim.device.api.crypto.cms.CMSSigner

public final class CMSSigner
extends Object

Groups together a signature signer and a group of certificates for use by CMS. This is used in a CMSSignedDataOutputStream in the addSigner call.

See Also:
CMSSignedDataOutputStream
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.0

Constructor Summary
Category: Signed CMSSigner(SignatureSigner signer, Certificate certificate)
          Creates a CMSSigner object for use in a CMSSignedDataOutputStream.
Category: Signed CMSSigner(SignatureSigner signer, Certificate[] certificateChain)
          Creates a CMSSigner for use in a CMS signed data output stream.
 
Method Summary
Category: Signed  boolean addAttribute(CMSAttribute attribute)
          Add an attribute to the CMSSigner.
Category: Signed  Enumeration getAttributes()
          Returns an Enumeration of the attributes associated with this signer.
Category: Signed  Certificate getCertificate()
          Returns the end-entity certificate from the certificate chain, if present.
Category: Signed  Certificate[] getCertificateChain()
          Returns the certificate chain, if present.
Category: Signed  Enumeration getSignedAttributes()
          Returns an Enumeration of the signed attributes associated with this signer.
Category: Signed  SignatureSigner getSigner()
          Returns the signature signer.
Category: Signed  Enumeration getUnsignedAttributes()
          Returns an Enumeration of the unsigned attributes associated with this signer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

CMSSigner

public CMSSigner(SignatureSigner signer,
                 Certificate certificate)
Creates a CMSSigner object for use in a CMSSignedDataOutputStream.

Parameters:
signer - The SignatureSigner to use to sign this message.
certificate - The signer's 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 4.0.0

CMSSigner

public CMSSigner(SignatureSigner signer,
                 Certificate[] certificateChain)
Creates a CMSSigner for use in a CMS signed data output stream.

Parameters:
signer - The SignatureSigner to use to sign this message.
certificateChain - A chain of certificates when certificateChain[0] is assumed to be the signer's certificate. An IllegalArgumentException will be thrown if this is argument is not specified correctly.
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.0


Method Detail

getSigner

public SignatureSigner getSigner()
Returns the signature signer.

Returns:
A SignatureSigner 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 4.0.0

getCertificateChain

public Certificate[] getCertificateChain()
Returns the certificate chain, if present.

Returns:
An array of certificates. 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 4.0.0

getCertificate

public Certificate getCertificate()
Returns the end-entity certificate from the certificate chain, if present. Otherwise null is returned

Returns:
A Certificate. 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 4.0.0

addAttribute

public boolean addAttribute(CMSAttribute attribute)
Add an attribute to the CMSSigner.

These attributes will be written out in the CMS message.

Parameters:
attribute - The CMSAttribute to associate with this CMSSigner.
Returns:
A boolean that determines if the attribute was added succesfully.
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.0

getSignedAttributes

public Enumeration getSignedAttributes()
Returns an Enumeration of the signed attributes associated with this signer.

Returns:
An Enumeration containing the signed attributes ( namely CMSAttributes ).
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.0

getUnsignedAttributes

public Enumeration getUnsignedAttributes()
Returns an Enumeration of the unsigned attributes associated with this signer.

Returns:
An Enumeration containing the unsigned attributes ( namely CMSAttributes ).
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.0

getAttributes

public Enumeration getAttributes()
Returns an Enumeration of the attributes associated with this signer.

Returns:
A Enumeration containing the attributes associated with the signer ( namely CMSAttributes ).
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.0





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.