SignedContentobject represents content which may be signed. A
SignedContentFactoryis used to create signed content objects.
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.
- This interface is not intended to be implemented by clients.
Method SummaryModifier and TypeMethodDescription
voidChecks if the certificates are valid for the specified signer.Returns all entries of the content.Returns the signed entry for the specified name.Returns all the signer infos for this
SignedContent.Returns the signing time for the signer info.Returns the TSA signer info used to authenticate the signer time of a signer info.
isSigned()Returns true if the content is signed; false otherwise.
getSignedEntriesSignedContentEntry getSignedEntries()Returns all entries of the content. The returned entries can be used to verify the entry content using
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.
- all entries of the content
getSignedEntryReturns the signed entry for the specified name.
name- the name of the entry
- the entry or null if the entry could not be found
getSignerInfosSignerInfo getSignerInfos()Returns all the signer infos for this
SignedContent. If the content is not signed then an empty array is returned.
- all the signer infos for this
isSignedboolean isSigned()Returns true if the content is signed; false otherwise. This is a convenience method equivalent to calling
getSignerInfos().length > 0
- true if the content is signed
getSigningTimeReturns the signing time for the signer info. If no TSA signers exist then null is returned
signerInfo- the signer info to get the signing time for
- the signing time
getTSASignerInfoReturns the TSA signer info used to authenticate the signer time of a signer info.
signerInfo- the signer info to get the TSA signer for
- the TSA signer info
(SignerInfo signerInfo) throws CertificateExpiredException, CertificateNotYetValidExceptionChecks if the certificates are valid for the specified signer. If the signer has a singing time returned by
getSigningTime(SignerInfo)then that time is used to check the validity of the certificates; otherwise the current time is used.