1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 package com.zeroc.IceSSL;
6 
7 /**
8  * A password callback is an alternate way to supply the plug-in with
9  * passwords; this avoids using plain text configuration properties.
10  **/
11 public interface PasswordCallback
12 {
13     /**
14      * Returns the password for the key. If an alias was selected
15      * by setting the <code>IceSSL.Alias</code> property, <code>alias</code>
16      * contains the property's value.
17      *
18      * @param alias The value of the property <code>IceSSL.Alias</code>, if that
19      * property is set; <code>null</code>, otherwise.
20      * @return The password for the key. The return value must not be <code>null</code>.
21      *
22      **/
getPassword(String alias)23     char[] getPassword(String alias);
24 
25     /**
26      * Returns the password for validating the truststore.
27      *
28      * @return The password. To skip truststore validation,
29      * return <code>null</code>.
30      **/
getTruststorePassword()31     char[] getTruststorePassword();
32 
33     /**
34      * Returns the password for validating the keystore.
35      *
36      * @return The password. To skip keystore validation,
37      * return <code>null</code>.
38      **/
getKeystorePassword()39     char[] getKeystorePassword();
40 }
41