|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.security.pkcsutil.PKCSDerObject | +--com.ibm.security.pkcs7.Content | +--com.ibm.security.pkcs7.SignedAndEnvelopedData
Implements the ASN.1 SignedAndEnvelopedData type.
Only X509Certificate and X509CRL objects are supported for certificates and crls respectively.
SignedAndEnvelopedData is no longer part of the RFC 2630 specifications. This class is included in this package for backwards compatibility. The PKCS #7 version 1.5 specifications indicate that the sequential combination of the SignedData and EnvelopedData content types is generally preferred over the use of the SignedAndEnvelopedData content type.
SignedAndEnvelopedData objects are immutable; they cannot be changed once created.
SignedData
,
EnvelopedData
Fields inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
provider |
Constructor Summary | |
SignedAndEnvelopedData(byte[] der)
Create a SignedAndEnvelopedData object with a DER-encoded byte array. |
|
SignedAndEnvelopedData(byte[] der,
String provider)
Create a SignedAndEnvelopedData object with a DER-encoded byte array. |
|
SignedAndEnvelopedData(RecipientInfo[] recipientInfos,
AlgorithmId[] digestAlgorithms,
EncryptedContentInfo encryptedContentInfo,
X509Certificate[] certsIn,
X509CRL[] crlsIn,
SignerInfo[] signersIn)
Create a SignedAndEnvelopedData object with specified values. |
|
SignedAndEnvelopedData(RecipientInfo[] recipientInfos,
AlgorithmId[] digestAlgorithms,
EncryptedContentInfo encryptedContentInfo,
X509Certificate[] certsIn,
X509CRL[] crlsIn,
SignerInfo[] signersIn,
String provider)
Create a SignedAndEnvelopedData object with specified values. |
|
SignedAndEnvelopedData(String filename,
boolean base64)
Create a SignedAndEnvelopedData with the filename of the DER-encoded or BASE64-encoded object. |
|
SignedAndEnvelopedData(String filename,
boolean base64,
String provider)
Create a SignedAndEnvelopedData with the filename of the DER-encoded or BASE64-encoded object. |
Method Summary | |
Object |
clone()
Creates a clone of this SignedAndEnvelopedData object. |
protected void |
decode(com.ibm.security.pkcs7.DerValue encoding)
Initializes a SignedAndEnvelopedData object from a DerValue. |
void |
encode(OutputStream os)
DER encode this object to an OutputStream. |
boolean |
equals(Object other)
Determines if this SignedAndEnvelopedData object is equivalent to the input object. |
Certificate |
getCertificate(IssuerAndSerialNumber issuer)
Retrieve a copy of the Certificate object that matches the specified IssuerAndSerialNumber. |
Certificate[] |
getCertificates()
Returns a copy of the set of signing certificates in an array of certificates. |
CRL[] |
getCRLs()
Returns a copy of the set of CRLs in an array of CRLs. |
AlgorithmId[] |
getDigestAlgorithms()
Returns a copy of the array of message digest algorithms. |
EncryptedContentInfo |
getEncryptedContentInfo()
Returns a copy of the EncryptedContentInfo. |
ObjectIdentifier |
getObjectIdentifier()
Returns a reference to the ObjectIdentifer for the SignedAndEnvelopedData object. |
RecipientInfo[] |
getRecipientInfos()
Returns a copy of the array of RecipientInfo objects. |
SignerInfo |
getSignerInfo(Certificate cert)
Retrieve a copy of the SignerInfo object that matches the specified certificate. |
SignerInfo[] |
getSignerInfos()
Returns a copy of the array of SignerInfo objects. |
BigInteger |
getVersion()
Returns a reference to the version for this object. |
boolean |
hasCertificate(Certificate cert)
Determine if this SignedAndEnvelopedData object has the specified certificate. |
String |
toString()
Returns a string representation of this SignedAndEnvelopedData object. |
Methods inherited from class com.ibm.security.pkcsutil.PKCSDerObject |
decode,
decode,
encode,
hashCode,
read,
readBASE64,
write,
write,
writeBASE64 |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public SignedAndEnvelopedData(byte[] der) throws IOException
der
- a DER-encoded byte array of a SignerInfo object.public SignedAndEnvelopedData(byte[] der, String provider) throws IOException
der
- a DER-encoded byte array of a SignerInfo object.provider
- the name of the java security provider to use.public SignedAndEnvelopedData(RecipientInfo[] recipientInfos, AlgorithmId[] digestAlgorithms, EncryptedContentInfo encryptedContentInfo, X509Certificate[] certsIn, X509CRL[] crlsIn, SignerInfo[] signersIn)
recipientInfos
- array of RecipientInfo objects.digestAlgorithms
- array of message digest AlgorithmId objects.encryptedContentInfo
- EncryptedContentInfo object.certsIn
- array of X509Certificate objects.crlsIn
- array of X509CRL objects.signersIn
- array of SignerInfo objects.public SignedAndEnvelopedData(RecipientInfo[] recipientInfos, AlgorithmId[] digestAlgorithms, EncryptedContentInfo encryptedContentInfo, X509Certificate[] certsIn, X509CRL[] crlsIn, SignerInfo[] signersIn, String provider)
recipientInfos
- array of RecipientInfo objects.digestAlgorithms
- array of message digest AlgorithmId objects.encryptedContentInfo
- EncryptedContentInfo object.certsIn
- array of X509Certificate objects.crlsIn
- array of X509CRL objects.signersIn
- array of SignerInfo objects.provider
- the name of the java security provider to use.public SignedAndEnvelopedData(String filename, boolean base64) throws IOException
filename
- name of the DER-encoded or base64-encoded objectbase64
- true if BASE64-encoded, false if DER-encodedpublic SignedAndEnvelopedData(String filename, boolean base64, String provider) throws IOException
filename
- name of the DER-encoded or base64-encoded objectbase64
- true if BASE64-encoded, false if DER-encodedprovider
- the name of the java security provider to useMethod Detail |
public Object clone()
public ObjectIdentifier getObjectIdentifier()
public BigInteger getVersion()
public RecipientInfo[] getRecipientInfos()
public AlgorithmId[] getDigestAlgorithms()
public EncryptedContentInfo getEncryptedContentInfo()
public Certificate[] getCertificates()
public CRL[] getCRLs()
public SignerInfo[] getSignerInfos()
public SignerInfo getSignerInfo(Certificate cert) throws IOException
cert
- certificate to match onpublic Certificate getCertificate(IssuerAndSerialNumber issuer) throws IOException
issuer
- IssuerAndSerialNumber to match onpublic boolean hasCertificate(Certificate cert) throws IOException
cert
- certificate to match onpublic void encode(OutputStream os) throws IOException
os
- the OutputStream to write the encoded data to.protected void decode(com.ibm.security.pkcs7.DerValue encoding) throws IOException
encoding
- a DER-encoded SignedAndEnvelopedData object.public boolean equals(Object other)
other
- the object to compare this one to.public String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |