|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SignedContent
A SignedContent
object represents content which may be signed. A
SignedContentFactory
is used to create signed content objects.
A SignedContent
object is intended to provide information about
the signers of the content, and cannot be used to access the actual data of the content.
This interface is not intended to be implemented by clients.
Method Summary | |
---|---|
void |
checkValidity(SignerInfo signerInfo)
Checks if the certificates are valid for the specified signer. |
SignedContentEntry[] |
getSignedEntries()
Returns all entries of the content. |
SignedContentEntry |
getSignedEntry(java.lang.String name)
Returns the signed entry for the specified name. |
SignerInfo[] |
getSignerInfos()
Returns all the signer infos for this SignedContent . |
java.util.Date |
getSigningTime(SignerInfo signerInfo)
Returns the signing time for the signer info. |
SignerInfo |
getTSASignerInfo(SignerInfo signerInfo)
Returns the TSA signer info used to authenticate the signer time of a signer info. |
boolean |
isSigned()
Returns true if the content is signed; false otherwise. |
Method Detail |
---|
SignedContentEntry[] getSignedEntries()
SignedContentEntry.verify()
and
get signer info for each entry in this content using SignedContentEntry.getSignerInfos()
.
Note that this operation may be expensive because it requires an
exhaustive search for entries over the entire content.
Unsigned entries are included in the result. Entries for which signer info exists but no content is found are also returned. For example, when an entry is removed from a signed jar but the jar is not resigned, the signer thinks the entry should exist but the content got removed. This would be considered an invalid entry which would fail verification.
SignedContentEntry getSignedEntry(java.lang.String name)
name
- the name of the entry
SignerInfo[] getSignerInfos()
SignedContent
. If the content
is not signed then an empty array is returned.
SignedContent
boolean isSigned()
getSignerInfos()
.length > 0
java.util.Date getSigningTime(SignerInfo signerInfo)
signerInfo
- the signer info to get the signing time for
SignerInfo getTSASignerInfo(SignerInfo signerInfo)
signerInfo
- the signer info to get the TSA signer for
void checkValidity(SignerInfo signerInfo) throws java.security.cert.CertificateExpiredException, java.security.cert.CertificateNotYetValidException
getSigningTime(SignerInfo)
then that time is used to check the
validity of the certificates; otherwise the current time is used.
signerInfo
- the signer info to check validity for.
java.security.cert.CertificateExpiredException
- if one of the certificates of this signer is expired
java.security.cert.CertificateNotYetValidException
- if one of the certificates of this signer is not yet valid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |