KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > internal > provisional > verifier > CertificateTrustAuthority


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
12 package org.eclipse.osgi.internal.provisional.verifier;
13
14 import java.security.cert.Certificate JavaDoc;
15 import java.security.cert.CertificateException JavaDoc;
16
17 /**
18  * A CertificateTrustAuthority is used to check if certificate chains are trusted.
19  *
20  */

21 public interface CertificateTrustAuthority {
22
23     /**
24      * Determines if the certificates are trusted. This method will throw a
25      * <code>CertificateException</code> if the specified certificate chain is not trusted.
26      * @param certChain a chain of certificates
27      * @throws CertificateException if the certficates are not trusted
28      */

29     public void checkTrust(Certificate JavaDoc[] certChain) throws CertificateException JavaDoc;
30
31     /**
32      * Add the specified certificate chain as a trusted certificate chain.
33      *
34      * @param certChain a chain of certificates
35      */

36     public void addTrusted(Certificate JavaDoc[] certChain) throws CertificateException JavaDoc;
37 }
38
Popular Tags