codec.pkcs7
Interface Signable

All Superinterfaces:
CertificateSource
All Known Implementing Classes:
SignedData, SignedAndEnvelopedData

public interface Signable
extends CertificateSource

A common interface for signable classes such as SignedData and SignedAndEnvelopedData.

Version:
"$Id: Signable.java,v 1.3 2002/08/28 21:40:35 jpeters Exp $"
Author:
Markus Tak

Fields inherited from interface codec.util.CertificateSource
ALL, DATA_ENCIPHERMENT, KEY_AGREEMENT, KEY_CERT_SIGN, KEY_ENCIPHERMENT, NON_REPUDIATION
 
Method Summary
 void addSignerInfo(SignerInfo info)
          Adds the given SignerInfo to this instance.
 ASN1Type getContent()
          Retrieves the content of theSignable, consisting of the ASN.1 type embedded in its ContentInfo structure.
 ASN1ObjectIdentifier getContentType()
          Returns the content type of the content embedded in this structure.
 SignerInfo getSignerInfo(X509Certificate cert)
          Returns the SignerInfo that matches the given certificate.
 
Methods inherited from interface codec.util.CertificateSource
certificates, certificates, getCertificate
 

Method Detail

addSignerInfo

public void addSignerInfo(SignerInfo info)
Adds the given SignerInfo to this instance. This method should be used rarely. In general, the Signer instances take care of adding SignerInfo instances. Explicit adding of a SignerInfo is provided only in those cases where fine control of the creation of signatures is required.
Parameters:
info - The SignerInfo to add.

getSignerInfo

public SignerInfo getSignerInfo(X509Certificate cert)
Returns the SignerInfo that matches the given certificate.
Parameters:
cert - The certificate matching the SignerInfo to be retrieved.
Returns:
The SignerInfo or null if no matching one is found.

getContent

public ASN1Type getContent()
                    throws GeneralSecurityException
Retrieves the content of theSignable, consisting of the ASN.1 type embedded in its ContentInfo structure.
Returns:
The contents octets.
Throws:
GeneralSecurityException - if a cipher operation fails (only if content is encrypted).

getContentType

public ASN1ObjectIdentifier getContentType()
Returns the content type of the content embedded in this structure.
Returns:
The content type of this structure's payload.


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.