SslMode

How much protection the connection demands of its transport, in PostgreSQL's own vocabulary.

The modes form a ladder, and the rung that matters is between REQUIRE and VERIFY_CA: everything below VERIFY_CA encrypts the connection without establishing who is on the other end of it, which an intermediary can satisfy with a certificate of its own. ChannelBinding is what closes that gap without a certificate chain to check against.

Entries

Link copied to clipboard

Never encrypt. A server that demands TLS refuses the connection.

Link copied to clipboard

Encrypt if the server offers it, connect in the clear if not. The default.

Link copied to clipboard

Refuse to connect unencrypted. The certificate itself is not checked.

Link copied to clipboard

Encrypt, and verify the server's certificate chains to a trusted CA. Needs sslrootcert.

Link copied to clipboard

As VERIFY_CA, and additionally require the certificate to name the host being connected to.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The spelling used in a JDBC URL and by libpq.

Functions

Link copied to clipboard
fun valueOf(value: String): SslMode

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.