org.eclipse.osgi.signedcontent.SignedContentEntry Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aspectjtools Show documentation
Show all versions of aspectjtools Show documentation
Tools from the AspectJ project
/*******************************************************************************
* Copyright (c) 2005, 2012 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.osgi.signedcontent;
import java.io.IOException;
// encapsulates the status of an entry: isSigned, timestamp info, SignerInfos, etc
// implemented by SignedBundleFile.SignedBundleEntry
/**
* A SignedContentEntry
represents a content entry which may be
* signed.
*
* A SignedContentEntry
object is intended to provide information about
* the signers of the content entry, and cannot be used to access the actual data of the entry.
*
*
* This interface is not intended to be implemented by clients.
*
* @since 3.4
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface SignedContentEntry {
/**
* Returns the name of the entry.
* @return the name of the entry.
*/
public String getName();
/**
* Returns the signer infos for this SignedContentEntry
. If the entry
* is not signed then an empty array is returned.
* @return the signer infos for this SignedContentEntry
*/
public SignerInfo[] getSignerInfos();
/**
* Returns true if the entry is signed; false otherwise. This is a convenience method
* equivalent to calling {@link #getSignerInfos()}.length > 0
* @return true if the content is signed
*/
public boolean isSigned();
// Does the digest of this entry match what is expected?
// TODO: what does this mean in the face of multiple signers
/**
* Verifies the content of this this entry is valid.
* @throws IOException if an error occurred reading the entry content
* @throws InvalidContentException if the entry content is not valid
*/
public void verify() throws IOException, InvalidContentException;
}