Class LibPQFactory
java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
org.postgresql.ssl.WrappedFactory
org.postgresql.ssl.LibPQFactory
- Direct Known Subclasses:
LibPQFactory
Provide an SSLSocketFactory that is compatible with the libpq behaviour.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA CallbackHandler that reads the password from the console or returns the password given to its constructor. -
Field Summary
FieldsFields inherited from class WrappedFactory
factory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate CallbackHandlergetCallbackHandler(Properties info) private voidinitP12(String sslkeyfile, Properties info) private voidinitPk8(String sslkeyfile, String defaultdir, Properties info) voidPropagates any exception fromLazyKeyManager.Methods inherited from class WrappedFactory
createSocket, createSocket, createSocket, createSocket, createSocket, getDefaultCipherSuites, getSupportedCipherSuitesMethods inherited from class SSLSocketFactory
createSocket, getDefaultMethods inherited from class SocketFactory
createSocket
-
Field Details
-
km
KeyManager km -
defaultfile
boolean defaultfile
-
-
Constructor Details
-
LibPQFactory
- 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 Details
-
getCallbackHandler
- Throws:
PSQLException
-
initPk8
- Throws:
PSQLException
-
initP12
- Throws:
PSQLException
-
throwKeyManagerException
Propagates any exception fromLazyKeyManager.- Throws:
PSQLException- if there is an exception to propagate
-