com.amazon.redshift.ssl

## Class PKCS12KeyManager

- java.lang.Object
- - com.amazon.redshift.ssl.PKCS12KeyManager

All Implemented Interfaces:
  KeyManager, X509KeyManager

    public class PKCS12KeyManager
    extends Object
    implements X509KeyManager

### Constructor Summary

Constructors
Constructor and Description
`PKCS12KeyManager(String pkcsFile, CallbackHandler cbh)`

### Method Summary

Methods
`String` `chooseClientAlias(String[] strings, Principal[] principals, Socket socket)`
`String` `chooseServerAlias(String s, Principal[] principals, Socket socket)`
`X509Certificate[]` `getCertificateChain(String alias)`
`String[]` `getClientAliases(String keyType, Principal[] principals)`
`PrivateKey` `getPrivateKey(String s)`
`String[]` `getServerAliases(String s, Principal[] principals)`
`void` `throwKeyManagerException()` getCertificateChain and getPrivateKey cannot throw exeptions, therefore any exception is stored in `error` and can be raised by this method.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PKCS12KeyManager

    public PKCS12KeyManager(String pkcsFile,
                    CallbackHandler cbh)
                     throws RedshiftException

Throws:
  `RedshiftException`

### Method Detail

#### throwKeyManagerException

    public void throwKeyManagerException()
                                  throws RedshiftException

getCertificateChain and getPrivateKey cannot throw exeptions, therefore any exception is stored in `error` and can be raised by this method.

Throws:
  `RedshiftException` - if any exception is stored in `error` and can be raised

#### getClientAliases

    public String[] getClientAliases(String keyType,
                            Principal[] principals)

Specified by:
  `getClientAliases` in interface `X509KeyManager`

#### chooseClientAlias

    public String chooseClientAlias(String[] strings,
                           Principal[] principals,
                           Socket socket)

Specified by:
  `chooseClientAlias` in interface `X509KeyManager`

#### getServerAliases

    public String[] getServerAliases(String s,
                            Principal[] principals)

Specified by:
  `getServerAliases` in interface `X509KeyManager`

#### chooseServerAlias

    public String chooseServerAlias(String s,
                           Principal[] principals,
                           Socket socket)

Specified by:
  `chooseServerAlias` in interface `X509KeyManager`

#### getCertificateChain

    public X509Certificate[] getCertificateChain(String alias)

Specified by:
  `getCertificateChain` in interface `X509KeyManager`

#### getPrivateKey

    public PrivateKey getPrivateKey(String s)

Specified by:
  `getPrivateKey` in interface `X509KeyManager`