Package org.postgresql.ssl.jdbc4
Class LibPQFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- javax.net.ssl.SSLSocketFactory
-
- org.postgresql.ssl.WrappedFactory
-
- org.postgresql.ssl.LibPQFactory
-
- org.postgresql.ssl.jdbc4.LibPQFactory
-
- All Implemented Interfaces:
javax.net.ssl.HostnameVerifier
@Deprecated public class LibPQFactory extends LibPQFactory implements javax.net.ssl.HostnameVerifier
Deprecated.preferLibPQFactory
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.postgresql.ssl.LibPQFactory
LibPQFactory.ConsoleCallbackHandler
-
-
Field Summary
-
Fields inherited from class org.postgresql.ssl.WrappedFactory
factory
-
-
Constructor Summary
Constructors Constructor Description LibPQFactory(java.util.Properties info)
Deprecated.preferLibPQFactory
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
verify(java.lang.String hostname, javax.net.ssl.SSLSession session)
Deprecated.use PgjdbcHostnameVerifierstatic boolean
verifyHostName(java.lang.String hostname, java.lang.String pattern)
Deprecated.-
Methods inherited from class org.postgresql.ssl.LibPQFactory
throwKeyManagerException
-
Methods inherited from class org.postgresql.ssl.WrappedFactory
createSocket, createSocket, createSocket, createSocket, createSocket, getDefaultCipherSuites, getSupportedCipherSuites
-
-
-
-
Constructor Detail
-
LibPQFactory
@Deprecated public LibPQFactory(java.util.Properties info) throws PSQLException
Deprecated.preferLibPQFactory
- Parameters:
info
- the connection parameters The following parameters are used: sslmode,sslcert,sslkey,sslrootcert,sslhostnameverifier,sslpasswordcallback,sslpassword- Throws:
PSQLException
- if security error appears when initializing factory
-
-
Method Detail
-
verifyHostName
@Deprecated public static boolean verifyHostName(java.lang.String hostname, java.lang.String pattern)
Deprecated.Verifies if given hostname matches pattern.- Parameters:
hostname
- input hostnamepattern
- domain name pattern- Returns:
- true when domain matches pattern
-
verify
@Deprecated public boolean verify(java.lang.String hostname, javax.net.ssl.SSLSession session)
Deprecated.use PgjdbcHostnameVerifierVerifies the server certificate according to the libpq rules. The cn attribute of the certificate is matched against the hostname. If the cn attribute starts with an asterisk (*), it will be treated as a wildcard, and will match all characters except a dot (.). This means the certificate will not match subdomains. If the connection is made using an IP address instead of a hostname, the IP address will be matched (without doing any DNS lookups).- Specified by:
verify
in interfacejavax.net.ssl.HostnameVerifier
- Parameters:
hostname
- Hostname or IP address of the server.session
- The SSL session.- Returns:
- true if the certificate belongs to the server, false otherwise.
- See Also:
PGjdbcHostnameVerifier
-
-