Package org.postgresql.ssl
Class PKCS12KeyManager
- java.lang.Object
-
- org.postgresql.ssl.PKCS12KeyManager
-
- All Implemented Interfaces:
KeyManager,X509KeyManager
public class PKCS12KeyManager extends Object implements X509KeyManager
-
-
Constructor Summary
Constructors Constructor Description PKCS12KeyManager(String pkcsFile, CallbackHandler cbh)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringchooseClientAlias(String[] strings, Principal[] principals, Socket socket)StringchooseServerAlias(String s, Principal[] principals, Socket socket)X509Certificate[]getCertificateChain(String alias)String[]getClientAliases(String keyType, Principal[] principals)PrivateKeygetPrivateKey(String s)String[]getServerAliases(String s, Principal[] principals)voidthrowKeyManagerException()getCertificateChain and getPrivateKey cannot throw exeptions, therefore any exception is stored inerrorand can be raised by this method.
-
-
-
Constructor Detail
-
PKCS12KeyManager
public PKCS12KeyManager(String pkcsFile, CallbackHandler cbh) throws PSQLException
- Throws:
PSQLException
-
-
Method Detail
-
throwKeyManagerException
public void throwKeyManagerException() throws PSQLExceptiongetCertificateChain and getPrivateKey cannot throw exeptions, therefore any exception is stored inerrorand can be raised by this method.- Throws:
PSQLException- if any exception is stored inerrorand can be raised
-
getClientAliases
public String[] getClientAliases(String keyType, Principal[] principals)
- Specified by:
getClientAliasesin interfaceX509KeyManager
-
chooseClientAlias
public String chooseClientAlias(String[] strings, Principal[] principals, Socket socket)
- Specified by:
chooseClientAliasin interfaceX509KeyManager
-
getServerAliases
public String[] getServerAliases(String s, Principal[] principals)
- Specified by:
getServerAliasesin interfaceX509KeyManager
-
chooseServerAlias
public String chooseServerAlias(String s, Principal[] principals, Socket socket)
- Specified by:
chooseServerAliasin interfaceX509KeyManager
-
getCertificateChain
public X509Certificate[] getCertificateChain(String alias)
- Specified by:
getCertificateChainin interfaceX509KeyManager
-
getPrivateKey
public PrivateKey getPrivateKey(String s)
- Specified by:
getPrivateKeyin interfaceX509KeyManager
-
-