Top Fields Constructors Methods
org.postgresql.ssl.jdbc4

public Class LibPQFactory

extends LibPQFactory
implements HostnameVerifier
Class Inheritance
All Implemented Interfaces
javax.net.ssl.HostnameVerifier
Annotations
@Deprecated
Imports
org.postgresql.jdbc.SslMode, org.postgresql.ssl.PGjdbcHostnameVerifier, org.postgresql.util.PSQLException, java.net.IDN, java.util.Properties, javax.net.ssl.HostnameVerifier, .SSLSession

Deprecated

prefer org.postgresql.ssl.LibPQFactory

Field Summary

Modifier and TypeField and Description
private final SslMode

Constructor Summary

AccessConstructor and Description
public
LibPQFactory(Properties
the connection parameters The following parameters are used: sslmode,sslcert,sslkey,sslrootcert,sslhostnameverifier,sslpasswordcallback,sslpassword
info
)

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the certificate belongs to the server, false otherwise.
verify
(String
Hostname or IP address of the server.
hostname
,
SSLSession
The SSL session.
session
)

Implements javax.net.ssl.HostnameVerifier.verify.

Deprecated use PgjdbcHostnameVerifier

Verifies the server certificate according to the libpq rules.

public static boolean

Returns:

true when domain matches pattern
verifyHostName
(String
input hostname
hostname
,
String
domain name pattern
pattern
)
Deprecated use PGjdbcHostnameVerifier

Verifies if given hostname matches pattern.

Inherited from org.postgresql.ssl.LibPQFactory:
throwKeyManagerException

Field Detail

sslModeback to summary
private final SslMode sslMode

Constructor Detail

LibPQFactoryback to summary
public LibPQFactory(Properties info) throws PSQLException
Parameters
info:Properties

the connection parameters The following parameters are used: sslmode,sslcert,sslkey,sslrootcert,sslhostnameverifier,sslpasswordcallback,sslpassword

Annotations
@Deprecated
Exceptions
PSQLException:
if security error appears when initializing factory

Method Detail

verifyback to summary
public boolean verify(String hostname, SSLSession session)

Implements javax.net.ssl.HostnameVerifier.verify.

Deprecated

use PgjdbcHostnameVerifier

Verifies 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).

Parameters
hostname:String

Hostname or IP address of the server.

session:SSLSession

The SSL session.

Returns:boolean

true if the certificate belongs to the server, false otherwise.

Annotations
@Deprecated
@Override
See Also
PGjdbcHostnameVerifier
verifyHostNameback to summary
public static boolean verifyHostName(String hostname, String pattern)

Deprecated

use PGjdbcHostnameVerifier

Verifies if given hostname matches pattern.

Parameters
hostname:String

input hostname

pattern:String

domain name pattern

Returns:boolean

true when domain matches pattern

Annotations
@Deprecated