public class LibPQFactory extends WrappedFactory implements javax.net.ssl.HostnameVerifier
Modifier and Type | Class and Description |
---|---|
(package private) static class |
LibPQFactory.ConsoleCallbackHandler
A CallbackHandler that reads the password from the console or returns the password given to its
constructor.
|
Modifier and Type | Field and Description |
---|---|
private static int |
ALT_DNS_NAME |
(package private) LazyKeyManager |
km |
(package private) java.lang.String |
sslmode |
_factory
Constructor and Description |
---|
LibPQFactory(java.util.Properties info) |
Modifier and Type | Method and Description |
---|---|
void |
throwKeyManagerException()
Propagates any exception from
LazyKeyManager . |
boolean |
verify(java.lang.String hostname,
javax.net.ssl.SSLSession session)
Verifies the server certificate according to the libpq rules.
|
static boolean |
verifyHostName(java.lang.String hostname,
java.lang.String pattern) |
createSocket, createSocket, createSocket, createSocket, createSocket, getDefaultCipherSuites, getSupportedCipherSuites
private static final int ALT_DNS_NAME
LazyKeyManager km
java.lang.String sslmode
public LibPQFactory(java.util.Properties info) throws PSQLException
info
- the connection parameters The following parameters are used:
sslmode,sslcert,sslkey,sslrootcert,sslhostnameverifier,sslpasswordcallback,sslpasswordPSQLException
- if security error appears when initializing factorypublic void throwKeyManagerException() throws PSQLException
LazyKeyManager
.PSQLException
- if there is an exception to propagatepublic static boolean verifyHostName(java.lang.String hostname, java.lang.String pattern)
public boolean verify(java.lang.String hostname, javax.net.ssl.SSLSession session)
verify
in interface javax.net.ssl.HostnameVerifier
hostname
- Hostname or IP address of the server.session
- The SSL session.