1 /******************************************************************************* 2 * Copyright (c) 2006 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.osgi.internal.provisional.verifier; 12 13 import java.io.File; 14 import java.io.IOException; 15 import org.osgi.framework.Bundle; 16 17 /** 18 * A factory used to create certificate verifiers. 19 * <p> 20 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as 21 * part of a work in progress. There is no guarantee that this API will 22 * work or that it will remain the same. Please do not use this API without 23 * consulting with the equinox team. 24 * </p> 25 */ 26 public interface CertificateVerifierFactory { 27 /** 28 * Creates a certificate verifier for the specified content of a repository 29 * @param content the content of the repository 30 * @return a certificate verifier for the specified content of a repository 31 * @throws IOException if an IO exception occurs while reading the repository 32 */ 33 public CertificateVerifier getVerifier(File content) throws IOException; 34 35 /** 36 * Returns a certificate verifier for the specified bundle. 37 * @param bundle the bundle to get a verifier for 38 * @return a certificate verifier for the specified bundle. 39 * @throws IOException if an IO exception occurs while reading the bundle content 40 */ 41 public CertificateVerifier getVerifier(Bundle bundle) throws IOException; 42 } 43