tuweni / org.apache.tuweni.net.tls / TrustManagerFactories / whitelistServers

whitelistServers

static fun whitelistServers(knownServersFile: Path!): TrustManagerFactory! (source)

Require servers to present known certificates, or CA-signed certificates.

If a certificate is not CA-signed, then its fingerprint must be present in the knownServersFile, associated with the server (identified by host+port).

Parameters

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

Return
TrustManagerFactory!: A trust manager factory.

static fun whitelistServers(repository: FingerprintRepository!): TrustManagerFactory! (source)

Require servers to present known certificates, or CA-signed certificates.

If a certificate is not CA-signed, then its fingerprint must be present in the knownServersFile, associated with the server (identified by host+port).

Parameters

repository - FingerprintRepository!: The repository in which to record fingerprints by host.

Return
TrustManagerFactory!: A trust manager factory.

static fun whitelistServers(knownServersFile: Path!, acceptCASigned: Boolean): TrustManagerFactory! (source)

Require servers to present known certificates.

The fingerprint for a server certificate must be present in the knownServersFile, associated with the server (identified by host+port).

Parameters

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

acceptCASigned - Boolean: If true, CA-signed certificates will always be accepted.

Return
TrustManagerFactory!: A trust manager factory.

static fun whitelistServers(repository: FingerprintRepository!, acceptCASigned: Boolean): TrustManagerFactory! (source)

Require servers to present known certificates.

The fingerprint for a server certificate must be present in the knownServersFile, associated with the server (identified by host+port).

Parameters

repository - FingerprintRepository!: The repository in which to record fingerprints by host.

acceptCASigned - Boolean: If true, CA-signed certificates will always be accepted.

Return
TrustManagerFactory!: A trust manager factory.

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

Require servers to present known certificates, or CA-signed certificates.

If a certificate is not CA-signed, then its fingerprint must be present in the knownServersFile, associated with the server (identified by host+port).

Parameters

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

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

Return
TrustManagerFactory!: A trust manager factory.

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

Require servers to present known certificates, or CA-signed certificates.

If a certificate is not CA-signed, then its fingerprint must be present in the knownServersFile, associated with the server (identified by host+port).

Parameters

repository - FingerprintRepository!: The repository in which to record fingerprints by host.

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

Return
TrustManagerFactory!: A trust manager factory.