|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.security12.sun.security.pkcs.PKCS7
PKCS7 as defined in RSA Laboratories PKCS7 Technical Note. Profile Supports only SignedData ContentInfo type, where to the type of data signed is plain Data. For signedData, crls, attributes and PKCS#6 Extended Certificates are not supported.
Constructor Summary | |
PKCS7(AlgorithmId[] digestAlgorithmIds,
ContentInfo contentInfo,
X509Certificate[] certificates,
SignerInfo[] signerInfos)
Construct an initialized PKCS7 block. |
|
PKCS7(byte[] bytes)
Unmarshals a PKCS7 block from its encoded form, parsing the encoded bytes. |
|
PKCS7(DerInputStream derin)
Unmarshals a PKCS7 block from its encoded form, parsing the encoded bytes from the DerInputStream. |
|
PKCS7(InputStream in)
Unmarshals a PKCS7 block from its encoded form, parsing the encoded bytes from the InputStream. |
Method Summary | |
void |
encodeSignedData(DerOutputStream out)
Encodes the signed data to a DerOutputStream. |
void |
encodeSignedData(OutputStream out)
Encodes the signed data to an output stream. |
X509Certificate |
getCertificate(BigInt serial,
X500Name name)
Returns the X.509 certificate listed in this PKCS7 block which has a matching serial number and Issuer name, or null if one is not found. |
X509Certificate[] |
getCertificates()
Returns the X.509 certificates listed in this PKCS7 block. |
ContentInfo |
getContentInfo()
Returns the content information specified in this PKCS7 block. |
X509CRL[] |
getCRLs()
Returns the X.509 crls listed in this PKCS7 block. |
AlgorithmId[] |
getDigestAlgorithmIds()
Returns the message digest algorithms specified in this PKCS7 block. |
SignerInfo[] |
getSignerInfos()
Returns the signer's information specified in this PKCS7 block. |
BigInt |
getVersion()
Returns the version number of this PKCS7 block. |
boolean |
isOldStyle()
Returns true if this is a JDK1.1.x-style PKCS#7 block, and false otherwise. |
String |
toString()
Returns the PKCS7 block in a printable string form. |
SignerInfo[] |
verify()
Returns all signerInfos which self-verify. |
SignerInfo[] |
verify(byte[] bytes)
Returns all signerInfos which self-verify. |
SignerInfo |
verify(SignerInfo info,
byte[] bytes)
This verifies a given SignerInfo. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public PKCS7(InputStream in) throws sun.security.pkcs.ParsingException, IOException
in
- an input stream holding at least one PKCS7 block.public PKCS7(DerInputStream derin) throws sun.security.pkcs.ParsingException
derin
- a DerInputStream holding at least one PKCS7 block.public PKCS7(byte[] bytes) throws sun.security.pkcs.ParsingException
bytes
- the encoded bytes.public PKCS7(AlgorithmId[] digestAlgorithmIds, ContentInfo contentInfo, X509Certificate[] certificates, SignerInfo[] signerInfos)
digestAlgorithmIds
- the message digest algorithm identifiers.contentInfo
- the content information.certificates
- an array of X.509 certificates.signerInfos
- an array of signer information.Method Detail |
public void encodeSignedData(OutputStream out) throws IOException
out
- the output stream to write the encoded data to.public void encodeSignedData(DerOutputStream out) throws IOException
out
- the DerOutputStream to write the encoded data to.public SignerInfo verify(SignerInfo info, byte[] bytes) throws NoSuchAlgorithmException, SignatureException
info
- the signer information.bytes
- the DER encoded content information.public SignerInfo[] verify(byte[] bytes) throws NoSuchAlgorithmException, SignatureException
bytes
- the DER encoded content information.public SignerInfo[] verify() throws NoSuchAlgorithmException, SignatureException
public BigInt getVersion()
public AlgorithmId[] getDigestAlgorithmIds()
public ContentInfo getContentInfo()
public X509Certificate[] getCertificates()
public X509CRL[] getCRLs()
public SignerInfo[] getSignerInfos()
public X509Certificate getCertificate(BigInt serial, X500Name name)
serial
- the serial number of the certificate to retrieve.name
- the Distinguished Name of the Issuer.public String toString()
public boolean isOldStyle()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |