KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jivesoftware > messenger > net > SSLJiveKeyManager


1 /**
2  * $RCSfile: SSLJiveKeyManager.java,v $
3  * $Revision: 1.2 $
4  * $Date: 2004/10/25 23:41:59 $
5  *
6  * Copyright (C) 2004 Jive Software. All rights reserved.
7  *
8  * This software is published under the terms of the GNU Public License (GPL),
9  * a copy of which is included in this distribution.
10  */

11
12 package org.jivesoftware.messenger.net;
13
14 import com.sun.net.ssl.X509KeyManager;
15 import java.net.Socket JavaDoc;
16 import java.security.Principal JavaDoc;
17 import java.security.PrivateKey JavaDoc;
18 import java.security.cert.X509Certificate JavaDoc;
19
20 /**
21  * A skeleton placeholder for developers wishing to implement their own custom
22  * key manager. In future revisions we may expand the skeleton code if customers
23  * request assistance in creating custom key managers.
24  * <p/>
25  * The key manager is an essential part of server SSL support. Typically you
26  * will implement a custom key manager to retrieve certificates from repositories
27  * that are not of standard Java types (e.g. obtaining them from LDAP or a JDBC database).
28  *
29  * @author Iain Shigeoka
30  */

31 public class SSLJiveKeyManager implements X509KeyManager {
32     public String JavaDoc[] getClientAliases(String JavaDoc s, Principal JavaDoc[] principals) {
33         return new String JavaDoc[0];
34     }
35
36     public String JavaDoc chooseClientAlias(String JavaDoc s, Principal JavaDoc[] principals) {
37         return null;
38     }
39
40     public String JavaDoc chooseClientAlias(String JavaDoc[] strings, Principal JavaDoc[] principals, Socket JavaDoc socket) {
41         return null;
42     }
43
44     public String JavaDoc[] getServerAliases(String JavaDoc s, Principal JavaDoc[] principals) {
45         return new String JavaDoc[0];
46     }
47
48     public String JavaDoc chooseServerAlias(String JavaDoc s, Principal JavaDoc[] principals) {
49         return null;
50     }
51
52     public String JavaDoc chooseServerAlias(String JavaDoc s, Principal JavaDoc[] principals, Socket JavaDoc socket) {
53         return null;
54     }
55
56     public X509Certificate JavaDoc[] getCertificateChain(String JavaDoc s) {
57         return new X509Certificate JavaDoc[0];
58     }
59
60     public PrivateKey JavaDoc getPrivateKey(String JavaDoc s) {
61         return null;
62     }
63 }
64
Popular Tags