| Modifier and Type | Field and Description |
|---|---|
| private final CallbackHandler | |
| private @Nullable X509Certificate[] | |
| private final @Nullable String | |
| private final boolean | |
| private @Nullable PSQLException | |
| private @Nullable PrivateKey | |
| private final @Nullable String |
| Access | Constructor and Description |
|---|---|
| public | LazyKeyManager(@Nullable String
certfile certfile, @Nullable String key file keyfile, CallbackHandler callback handler cbh, boolean default file defaultfile)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public @Nullable String | chooseClientAlias(String[]
the key algorithm type name(s), ordered
with the most-preferred key type first. keyType, @Nullable Principal[] the list of acceptable CA issuer subject names
or null if it does not matter which issuers are used. issuers, @Nullable Socket the socket to be used for this connection. This
parameter can be null, which indicates that
implementations are free to select an alias applicable
to any socket. socket)Implements javax. Choose an alias to authenticate the client side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any). |
| public @Nullable String | chooseServerAlias(String
the key algorithm type name. keyType, @Nullable Principal[] the list of acceptable CA issuer subject names
or null if it does not matter which issuers are used. issuers, @Nullable Socket the socket to be used for this connection. This
parameter can be null, which indicates that
implementations are free to select an alias applicable
to any socket. socket)Implements javax. Choose an alias to authenticate the server side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any). |
| public @Nullable X509Certificate[] | getCertificateChain(String
the alias name alias)Implements javax. Returns the certificate chain associated with the given alias. |
| public @Nullable String[] | getClientAliases(String
the key algorithm type name keyType, @Nullable Principal[] the list of acceptable CA issuer subject names,
or null if it does not matter which issuers are used. issuers)Implements javax. Get the matching aliases for authenticating the client side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any). |
| public @Nullable PrivateKey | getPrivateKey(String
the alias name alias)Implements javax. Returns the key associated with the given alias. |
| public @Nullable String[] | getServerAliases(String
the key algorithm type name keyType, @Nullable Principal[] the list of acceptable CA issuer subject names
or null if it does not matter which issuers are used. issuers)Implements javax. Get the matching aliases for authenticating the server side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any). |
| private static byte[] | |
| public void | throwKeyManagerException()
getCertificateChain and getPrivateKey cannot throw exceptions, therefore any exception is stored
in |
| cbh | back to summary |
|---|---|
| private final CallbackHandler cbh | |
| cert | back to summary |
|---|---|
| private @Nullable X509Certificate[] cert | |
| certfile | back to summary |
|---|---|
| private final @Nullable String certfile | |
| defaultfile | back to summary |
|---|---|
| private final boolean defaultfile | |
| error | back to summary |
|---|---|
| private @Nullable PSQLException error | |
| key | back to summary |
|---|---|
| private @Nullable PrivateKey key | |
| keyfile | back to summary |
|---|---|
| private final @Nullable String keyfile | |
| LazyKeyManager | back to summary |
|---|---|
| public LazyKeyManager(@Nullable String certfile, @Nullable String keyfile, CallbackHandler cbh, boolean defaultfile) Constructor. certfile and keyfile can be null, in that case no certificate is presented to the server.
| |
| chooseClientAlias | back to summary |
|---|---|
| public @Nullable String chooseClientAlias(String[] keyType, @Nullable Principal[] issuers, @Nullable Socket socket) Implements javax. Doc from javax. Choose an alias to authenticate the client side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any).
| |
| chooseServerAlias | back to summary |
|---|---|
| public @Nullable String chooseServerAlias(String keyType, @Nullable Principal[] issuers, @Nullable Socket socket) Implements javax. Doc from javax. Choose an alias to authenticate the server side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any).
| |
| getCertificateChain | back to summary |
|---|---|
| public @Nullable X509Certificate[] getCertificateChain(String alias) Implements javax. Doc from javax. Returns the certificate chain associated with the given alias.
| |
| getClientAliases | back to summary |
|---|---|
| public @Nullable String[] getClientAliases(String keyType, @Nullable Principal[] issuers) Implements javax. Doc from javax. Get the matching aliases for authenticating the client side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any). | |
| getPrivateKey | back to summary |
|---|---|
| public @Nullable PrivateKey getPrivateKey(String alias) Implements javax. Doc from javax. Returns the key associated with the given alias.
| |
| getServerAliases | back to summary |
|---|---|
| public @Nullable String[] getServerAliases(String keyType, @Nullable Principal[] issuers) Implements javax. Doc from javax. Get the matching aliases for authenticating the server side of a secure socket given the public key type and the list of certificate issuer authorities recognized by the peer (if any). | |
| readFileFully | back to summary |
|---|---|
| private static byte[] readFileFully(String path) throws IOException | |
| throwKeyManagerException | back to summary |
|---|---|
| public void throwKeyManagerException() throws PSQLException getCertificateChain and getPrivateKey cannot throw exceptions, therefore any exception is stored
in
| |