com.ibm.security12.sun.security.pkcs
Class SignerInfo

java.lang.Object
  |
  +--com.ibm.security12.sun.security.pkcs.SignerInfo

public class SignerInfo
extends Object
implements DerEncoder

A SignerInfo, as defined in PKCS#7's signedData type.

Version:
1.37 98/09/11
Author:
Benjamin Renaud

Constructor Summary
SignerInfo(DerInputStream derin)
          Parses a PKCS#7 signer info.
SignerInfo(DerInputStream derin, boolean oldStyle)
          Parses a PKCS#7 signer info.
SignerInfo(X500Name issuerName, BigInt serial, AlgorithmId digestAlgorithmId, AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest)
           
SignerInfo(X500Name issuerName, BigInt serial, AlgorithmId digestAlgorithmId, PKCS9Attributes authenticatedAttributes, AlgorithmId digestEncryptionAlgorithmId, byte[] encryptedDigest, PKCS9Attributes unauthenticatedAttributes)
           
 
Method Summary
 void derEncode(OutputStream out)
          DER encode this object onto an output stream.
 void encode(DerOutputStream out)
           
 PKCS9Attributes getAuthenticatedAttributes()
           
 X509Certificate getCertificate(PKCS7 block)
           
 ArrayList getCertificateChain(PKCS7 block)
           
 BigInt getCertificateSerialNumber()
           
 AlgorithmId getDigestAlgorithmId()
           
 AlgorithmId getDigestEncryptionAlgorithmId()
           
 byte[] getEncryptedDigest()
           
 X500Name getIssuerName()
           
 PKCS9Attributes getUnauthenticatedAttributes()
           
 BigInt getVersion()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SignerInfo

public SignerInfo(X500Name issuerName,
                  BigInt serial,
                  AlgorithmId digestAlgorithmId,
                  AlgorithmId digestEncryptionAlgorithmId,
                  byte[] encryptedDigest)

SignerInfo

public SignerInfo(X500Name issuerName,
                  BigInt serial,
                  AlgorithmId digestAlgorithmId,
                  PKCS9Attributes authenticatedAttributes,
                  AlgorithmId digestEncryptionAlgorithmId,
                  byte[] encryptedDigest,
                  PKCS9Attributes unauthenticatedAttributes)

SignerInfo

public SignerInfo(DerInputStream derin)
           throws IOException,
                  sun.security.pkcs.ParsingException
Parses a PKCS#7 signer info.

SignerInfo

public SignerInfo(DerInputStream derin,
                  boolean oldStyle)
           throws IOException,
                  sun.security.pkcs.ParsingException
Parses a PKCS#7 signer info.

This constructor is used only for backwards compatibility with PKCS#7 blocks that were generated using JDK1.1.x.

Parameters:
derin - the ASN.1 encoding of the signer info.
oldStyle - flag indicating whether or not the given signer info is encoded according to JDK1.1.x.
Method Detail

encode

public void encode(DerOutputStream out)
            throws IOException

derEncode

public void derEncode(OutputStream out)
               throws IOException
DER encode this object onto an output stream. Implements the DerEncoder interface.
Specified by:
derEncode in interface DerEncoder
Parameters:
out - the output stream on which to write the DER encoding.
Throws:
IOException - on encoding error.

getCertificate

public X509Certificate getCertificate(PKCS7 block)
                               throws IOException

getCertificateChain

public ArrayList getCertificateChain(PKCS7 block)
                              throws IOException

getVersion

public BigInt getVersion()

getIssuerName

public X500Name getIssuerName()

getCertificateSerialNumber

public BigInt getCertificateSerialNumber()

getDigestAlgorithmId

public AlgorithmId getDigestAlgorithmId()

getAuthenticatedAttributes

public PKCS9Attributes getAuthenticatedAttributes()

getDigestEncryptionAlgorithmId

public AlgorithmId getDigestEncryptionAlgorithmId()

getEncryptedDigest

public byte[] getEncryptedDigest()

getUnauthenticatedAttributes

public PKCS9Attributes getUnauthenticatedAttributes()

toString

public String toString()
Overrides:
toString in class Object