public enum SslMode extends Enum<SslMode>
Enum Constant and Description |
---|
ALLOW
Start with non-encrypted connection, then try encrypted one.
|
DISABLE
Do not use encrypted connections.
|
PREFER
Start with encrypted connection, fallback to non-encrypted (default).
|
REQUIRE
Ensure connection is encrypted.
|
VERIFY_CA
Ensure connection is encrypted, and client trusts server certificate.
|
VERIFY_FULL
Ensure connection is encrypted, client trusts server certificate, and server hostname matches
the one listed in the server certificate.
|
Modifier and Type | Method and Description |
---|---|
static SslMode |
of(Properties info) |
boolean |
requireEncryption() |
static SslMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SslMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
boolean |
verifyCertificate() |
boolean |
verifyPeerName() |
public static final SslMode DISABLE
public static final SslMode ALLOW
public static final SslMode PREFER
public static final SslMode REQUIRE
public static final SslMode VERIFY_CA
public static final SslMode VERIFY_FULL
public static SslMode[] values()
for (SslMode c : SslMode.values()) System.out.println(c);
public static SslMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean requireEncryption()
public boolean verifyCertificate()
public boolean verifyPeerName()
public static SslMode of(Properties info) throws PSQLException
PSQLException
Copyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.