SHOW Signed
 

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

java.lang.Object
  |
  +--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.

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

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

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

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

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

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

getCertificateChain

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

Returns:
An array of certificates. May be null.
Since:
JDE 4.0.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.

getSignedAttributes

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

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

getSigner

public SignatureSigner getSigner()
Returns the signature signer.

Returns:
A SignatureSigner object.
Since:
JDE 4.0.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.

getUnsignedAttributes

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

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