01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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;
20: import java.security.NoSuchAlgorithmException;
21: import java.security.PrivateKey;
22: import java.security.UnrecoverableKeyException;
23: import java.security.cert.Certificate;
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/
30: * src/java/org/apache/geronimo/management/geronimo/KeystoreInstance.java
31: *
32: * @version $Rev: $ $Date: $
33: */
34: public interface KeystoreInstance {
35:
36: String getName();
37:
38: String[] listPrivateKeys();
39:
40: String[] listTrustCertificates();
41:
42: Certificate getCertificate(String alias);
43:
44: String getCertificateAlias(Certificate cert);
45:
46: Certificate[] getCertificateChain(String alias);
47:
48: PrivateKey getPrivateKey(String alias);
49:
50: boolean isKeystoreLocked();
51:
52: boolean isKeyLocked(String keyAlias);
53:
54: KeyManager[] getKeyManager(String algorithm, String keyAlias)
55: throws NoSuchAlgorithmException, UnrecoverableKeyException,
56: KeyStoreException, KeystoreIsLocked, KeystoreIsLocked;
57:
58: TrustManager[] getTrustManager(String algorithm)
59: throws KeyStoreException, NoSuchAlgorithmException,
60: KeystoreIsLocked;
61:
62: }
|