KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > jbi > security > keystore > KeystoreInstance


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.servicemix.jbi.security.keystore;
18
19 import java.security.KeyStoreException JavaDoc;
20 import java.security.NoSuchAlgorithmException JavaDoc;
21 import java.security.PrivateKey JavaDoc;
22 import java.security.UnrecoverableKeyException JavaDoc;
23 import java.security.cert.Certificate JavaDoc;
24
25 import javax.net.ssl.KeyManager;
26 import javax.net.ssl.TrustManager;
27
28 /**
29  * Based on http://svn.apache.org/repos/asf/geronimo/trunk/modules/management/src/java/org/apache/geronimo/management/geronimo/KeystoreInstance.java
30  *
31  * @version $Rev: $ $Date: $
32  */

33 public interface KeystoreInstance {
34
35     String JavaDoc getName();
36
37     String JavaDoc[] listPrivateKeys();
38
39     String JavaDoc[] listTrustCertificates();
40
41     Certificate JavaDoc getCertificate(String JavaDoc alias);
42
43     String JavaDoc getCertificateAlias(Certificate JavaDoc cert);
44
45     Certificate JavaDoc[] getCertificateChain(String JavaDoc alias);
46
47     PrivateKey JavaDoc getPrivateKey(String JavaDoc alias);
48
49     boolean isKeystoreLocked();
50
51     boolean isKeyLocked(String JavaDoc keyAlias);
52
53     KeyManager[] getKeyManager(String JavaDoc algorithm, String JavaDoc keyAlias) throws NoSuchAlgorithmException JavaDoc, UnrecoverableKeyException JavaDoc, KeyStoreException JavaDoc, KeystoreIsLocked, KeystoreIsLocked;
54
55     TrustManager[] getTrustManager(String JavaDoc algorithm) throws KeyStoreException JavaDoc, NoSuchAlgorithmException JavaDoc, KeystoreIsLocked;
56
57 }
58
Popular Tags