public abstract class BaseX509KeyManager
extends java.lang.Object
implements javax.net.ssl.X509KeyManager
| Modifier and Type | Field and Description |
|---|---|
protected PSQLException |
error |
| Constructor and Description |
|---|
BaseX509KeyManager() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
chooseClientAlias(java.lang.String[] keyType,
java.security.Principal[] principals,
java.net.Socket socket) |
java.lang.String |
chooseServerAlias(java.lang.String s,
java.security.Principal[] principals,
java.net.Socket socket) |
java.lang.String[] |
getClientAliases(java.lang.String keyType,
java.security.Principal[] principals) |
java.lang.String[] |
getServerAliases(java.lang.String s,
java.security.Principal[] principals) |
void |
throwKeyManagerException()
getCertificateChain and getPrivateKey cannot throw exceptions, therefore any exception is stored
in
error and can be raised by this method. |
static void |
validateKeyFilePermissions(java.nio.file.Path keyPath)
Validates that the private key file has secure permissions, matching libpq behavior.
|
protected PSQLException error
public void throwKeyManagerException()
throws PSQLException
error and can be raised by this method.PSQLException - if any exception is stored in error and can be raisedpublic java.lang.String[] getClientAliases(java.lang.String keyType,
java.security.Principal[] principals)
getClientAliases in interface javax.net.ssl.X509KeyManagerpublic java.lang.String chooseClientAlias(java.lang.String[] keyType,
java.security.Principal[] principals,
java.net.Socket socket)
chooseClientAlias in interface javax.net.ssl.X509KeyManagerpublic java.lang.String[] getServerAliases(java.lang.String s,
java.security.Principal[] principals)
getServerAliases in interface javax.net.ssl.X509KeyManagerpublic java.lang.String chooseServerAlias(java.lang.String s,
java.security.Principal[] principals,
java.net.Socket socket)
chooseServerAlias in interface javax.net.ssl.X509KeyManagerpublic static void validateKeyFilePermissions(java.nio.file.Path keyPath)
throws PSQLException
keyPath - the path to the private key filePSQLException - if the file has insecure permissionsCopyright © 2026 PostgreSQL Global Development Group. All rights reserved.