tuweni / org.apache.tuweni.net.tls / VertxTrustOptions / trustServerOnFirstUse

trustServerOnFirstUse

static fun trustServerOnFirstUse(knownServersFile: Path!): TrustOptions! (source)

Accept CA-signed certificates, and otherwise trust server certificates on first use.

Except when a server presents a CA-signed certificate, on first connection to a server (identified by host+port) the fingerprint of the presented certificate will be recorded. On subsequent connections, the presented certificate will be matched to the stored fingerprint to ensure it has not changed.

Parameters

knownServersFile - Path!: The path to the file containing fingerprints by host.

Return
TrustOptions!: A Vert.x TrustOptions.

static fun trustServerOnFirstUse(repository: FingerprintRepository!): TrustOptions! (source)

Accept CA-signed certificates, and otherwise trust server certificates on first use.

Except when a server presents a CA-signed certificate, on first connection to a server (identified by host+port) the fingerprint of the presented certificate will be recorded. On subsequent connections, the presented certificate will be matched to the stored fingerprint to ensure it has not changed.

Parameters

repository - FingerprintRepository!: The repository containing fingerprints by host.

Return
TrustOptions!: A Vert.x TrustOptions.

static fun trustServerOnFirstUse(knownServersFile: Path!, acceptCASigned: Boolean): TrustOptions! (source)

Trust server certificates on first use.

On first connection to a server (identified by host+port) the fingerprint of the presented certificate will be recorded. On subsequent connections, the presented certificate will be matched to the stored fingerprint to ensure it has not changed.

Parameters

knownServersFile - Path!: The path to the file containing fingerprints by host.

acceptCASigned - Boolean: If true, CA-signed certificates will always be accepted (and the fingerprint will not be recorded).

Return
TrustOptions!: A Vert.x TrustOptions.

static fun trustServerOnFirstUse(repository: FingerprintRepository!, acceptCASigned: Boolean): TrustOptions! (source)

Trust server certificates on first use.

On first connection to a server (identified by host+port) the fingerprint of the presented certificate will be recorded. On subsequent connections, the presented certificate will be matched to the stored fingerprint to ensure it has not changed.

Parameters

repository - FingerprintRepository!: The repository containing fingerprints by host.

acceptCASigned - Boolean: If true, CA-signed certificates will always be accepted (and the fingerprint will not be recorded).

Return
TrustOptions!: A Vert.x TrustOptions.

static fun trustServerOnFirstUse(knownServersFile: Path!, tmf: TrustManagerFactory!): TrustOptions! (source)

Accept CA-signed certificates, and otherwise trust server certificates on first use.

Except when a server presents a CA-signed certificate, on first connection to a server (identified by host+port) the fingerprint of the presented certificate will be recorded. On subsequent connections, the presented certificate will be matched to the stored fingerprint to ensure it has not changed.

Parameters

knownServersFile - Path!: The path to the file containing fingerprints by host.

tmf - TrustManagerFactory!: A TrustManagerFactory for checking server certificates against a CA.

Return
TrustOptions!: A Vert.x TrustOptions.

static fun trustServerOnFirstUse(repository: FingerprintRepository!, tmf: TrustManagerFactory!): TrustOptions! (source)

Accept CA-signed certificates, and otherwise trust server certificates on first use.

Except when a server presents a CA-signed certificate, on first connection to a server (identified by host+port) the fingerprint of the presented certificate will be recorded. On subsequent connections, the presented certificate will be matched to the stored fingerprint to ensure it has not changed.

Parameters

repository - FingerprintRepository!: The repository containing fingerprints by host.

tmf - TrustManagerFactory!: A TrustManagerFactory for checking server certificates against a CA.

Return
TrustOptions!: A Vert.x TrustOptions.