Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.osgi.signedcontent
Interface SignedContent


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.

Since:
3.4
Restriction:
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 ( String name)
          Returns the signed entry for the specified name.
  SignerInfo[] getSignerInfos ()
          Returns all the signer infos for this SignedContent.
  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

getSignedEntries

SignedContentEntry[] 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.

Returns:
all entries of the content

getSignedEntry

SignedContentEntry getSignedEntry(
String name)
Returns the signed entry for the specified name.

Parameters:
name - the name of the entry
Returns:
the entry or null if the entry could not be found

getSignerInfos

SignerInfo[] getSignerInfos()
Returns all the signer infos for this SignedContent. If the content is not signed then an empty array is returned.

Returns:
all the signer infos for this SignedContent

isSigned

boolean isSigned()
Returns true if the content is signed; false otherwise. This is a convenience method equivalent to calling getSignerInfos().length > 0

Returns:
true if the content is signed

getSigningTime

Date getSigningTime(
SignerInfo signerInfo)
Returns the signing time for the signer info. If no TSA signers exist then null is returned

Parameters:
signerInfo - the signer info to get the signing time for
Returns:
the signing time

getTSASignerInfo

SignerInfo getTSASignerInfo(
SignerInfo signerInfo)
Returns the TSA signer info used to authenticate the signer time of a signer info.

Parameters:
signerInfo - the signer info to get the TSA signer for
Returns:
the TSA signer info

checkValidity

void checkValidity(
SignerInfo signerInfo)
                   throws 
CertificateExpiredException,
                          
CertificateNotYetValidException
Checks 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.

Parameters:
signerInfo - the signer info to check validity for.
Throws:
CertificateExpiredException - if one of the certificates of this signer is expired
CertificateNotYetValidException - if one of the certificates of this signer is not yet valid

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire