|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.pkcs7.ContentInfo | +--com.rsa.certj.pkcs7.SignedData
This class encodes and decodes the PKCS #7
SignedData
type. The signed-data content
type consists of content of any type and encrypted
message digests of the content for zero or more signers.
The encrypted digest for a signer is a digital
signature on the content for that signer. Any type of
content can be signed by any number of signers, in
parallel.
SignedData ::= SEQUENCE { version Version, digestAlgorithms DigestAlgorithmIdentifiers, contentInfo ContentInfo, certificates [0] IMPLICIT ExtendedCertificatesAndCertificates OPTIONAL, crls [1] IMPLICIT CertificateRevocationLists OPTIONAL, signerInfos SignerInfos } DigestAlgorithmIdentifiers ::= SET OF DigestAlgorithmIdentifier SignerInfos ::= SET OF SignerInfo |
SignedData
have the following meanings:
1
for this version.signerInfos
field.
See Also
Fields inherited from class com.rsa.certj.pkcs7.ContentInfo |
DATA, DIGESTED_DATA, ENCRYPTED_DATA, ENVELOPED_DATA, NO_CONTENT, PKCS7_VERSION_NUMBER_0, PKCS7_VERSION_NUMBER_1, SIGNED_DATA |
Constructor Summary |
|
SignedData(CertJ certJ,
CertPathCtx pathCtx)
Creates a new object to encode or decode PKCS #7
|
Method Summary |
|
void |
addCertificate(X509Certificate cert)
Adds an |
void |
addCRL(X509CRL crl)
Adds an |
void |
addSignerInfo(SignerInfo info)
Adds the signer information to the list of signers. |
void |
clearSensitiveData()
Clears any sensitive data. |
clone()
Overrides the default |
|
void |
createDetachedSignature()
Sets a flag to create the detached signature. |
boolean |
equals(Object obj)
Returns |
getCertificates()
Gets a |
|
getCRLs()
Gets a |
|
getFailedCertPathSigners()
Returns the list of signers that failed the building of the valid cert path. |
|
getFailedSigners()
Returns the list of signers that failed the signature verification. |
|
getSignerInfos()
Gets the signer information structures as a |
|
int |
getVersionNumber()
Gets the PKCS #7 syntax version number. |
void |
setContentInfo(ContentInfo content)
Sets the content data of this |
void |
setVersionNumber(int versionNumber)
Sets the PKCS #7 syntax version number. |
Methods inherited from class com.rsa.certj.pkcs7.ContentInfo |
bytesRead, clearInternalContentBuffer, endOfMessage, getContent, getContentInfoDERLen, getContentInfoDERLen, getContentType, getDevice, getDeviceList, getInstance, getInstance, getMessageType, getMessageType, getUnprocessedDataLen, readFinal, readInit, readInit, readInit, readUpdate, setCertJ, setCertPath, setDevice, writeMessage, writeMessage |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SignedData(CertJ certJ, CertPathCtx pathCtx)
SignedData
.Parameters
certJ | A | ||
pathCtx | A |
Method Detail |
public void setContentInfo(ContentInfo content) throws PKCS7Exception
SignedData
object.Parameters
content | A |
Throws
PKCS7Exception
- If this ContentInfo
object
cannot be cloned.public void setVersionNumber(int versionNumber)
Parameters
versionNumber | The PKCS #7 syntax version number. |
public int getVersionNumber()
Returns
public void addCertificate(X509Certificate cert) throws PKCS7Exception
X.509
certificate to the list of certificates.Parameters
cert | An |
Throws
PKCS7Exception
- If the certificate is null
.public Vector getCertificates() throws PKCS7Exception
Vector
of certificates.
Returns
Throws
PKCS7Exception
- If this certificate vector cannot be cloned.public Vector getCRLs() throws PKCS7Exception
Vector
of CRLs.
Returns
Throws
PKCS7Exception
- If this CRL vector cannot be cloned.public void addCRL(X509CRL crl) throws PKCS7Exception
X.509
CRL to the list of CRLs.Parameters
crl | An |
Throws
PKCS7Exception
- If crl is null
.public void addSignerInfo(SignerInfo info) throws PKCS7Exception
Parameters
info | The per-signer information. |
Throws
PKCS7Exception
- If the SignerInfo
cannot be added.public void createDetachedSignature()
public Vector getSignerInfos()
Vector
.
Returns
public Vector getFailedSigners()
Returns
null
.public Vector getFailedCertPathSigners()
Returns
null
.public Object clone() throws CloneNotSupportedException
clone
method
to get a deeper clone.
Overrides
clone
in class ContentInfo
Returns
SignedData
object,
a copy of this object.Throws
CloneNotSupportedException
- If the cloning operation
is not successful.public boolean equals(Object obj)
true
if this object
and obj contain the same
SignedData
;
returns false
otherwise.Overrides
equals
in class Object
Parameters
obj | An instance of the
|
Returns
boolean
indicating whether
these objects are equal.public void clearSensitiveData()
finalizer
will clear
the data, but it is not known when the garbage collector will call the
finalizer
. This method clears all sensitive data as soon
as possible.
Overrides
clearSensitiveData
in class ContentInfo
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |