01: package com.sun.portal.netlet.crypt.jsse;
02:
03: import java.io.InputStream;
04:
05: /*
06: * This interface will be implemented by application
07: * that needs a callback to set the keystore path
08: * and password.
09: *
10: * This is required because the password & path SHOULD be
11: * prompted only if client authentication is turned
12: * ON at the gateway. Therefore, the callback functions
13: * will be invoked from within the SSL client handshake
14: * routine. The only way we could detect if client
15: * authentication is enabled or not is when JSSE
16: * invokes chooseClientAlias of X509KeyManager.
17: *
18: * Currently, only JKS or PKCS12 are supported.
19: *
20: * The password and path information will be prompted only once.
21: *
22: */
23:
24: public interface NetletJSSEAuthContext {
25: /*
26: * getKeyStoreStream Reads the keystore and returns the stream
27: * @return
28: */
29: public InputStream getKeyStoreStream();
30:
31: /*
32: * getKeyStoreType Reads the keystore type and returns the type
33: * @return
34: */
35: public KeyStoreType getKeyStoreType();
36:
37: /*
38: * getKeyStorePassword Reads the keystore passphrase and returns the passphrase
39: * @return
40: */
41: public char[] getKeyStorePassword();
42:
43: /*
44: * getKeyStorePath Reads the keystore file system path and returns the path
45: * @return
46: */
47: public String getKeyStorePath();
48:
49: public void setKeyStorePath(String store);
50:
51: public void setKeyStorePassword(String passwd);
52:
53: }
|