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 | Field and Description |
---|---|
java.lang.String |
value |
static SslMode[] |
VALUES |
Modifier and Type | Method and Description |
---|---|
static SslMode |
of(java.util.Properties info) |
boolean |
requireEncryption() |
static SslMode |
valueOf(java.lang.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 final SslMode[] VALUES
public final java.lang.String value
public static SslMode[] values()
for (SslMode c : SslMode.values()) System.out.println(c);
public static SslMode valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean requireEncryption()
public boolean verifyCertificate()
public boolean verifyPeerName()
public static SslMode of(java.util.Properties info) throws PSQLException
PSQLException
Copyright © 2024 PostgreSQL Global Development Group. All rights reserved.