net.corda.core.crypto / WhitelistTrustManagerProvider

WhitelistTrustManagerProvider

object WhitelistTrustManagerProvider : Provider

Custom Security Provider that forces the TrustManagerFactory to be our custom one. Also holds the identity of the original TrustManager algorithm so that we can delegate most of the checking to the proper Java code. We simply add some more checks.

The whitelist automatically includes the local server DNS name and IP address





Properties

originalTrustProviderAlgorithm val originalTrustProviderAlgorithm: String
whitelist val whitelist: Set<String>

Functions

addWhitelistEntries fun addWhitelistEntries(serverNames: List<String>): Unit

Adds a list of servers to the whitelist and also adds their fully resolved name/ip address after DNS lookup If the server name is not an actual DNS name this is silently ignored. The DNS request may block the calling thread.

addWhitelistEntry fun addWhitelistEntry(serverName: String): Unit

Adds an extra name to the whitelist if not already present If this is a new entry it will internally request a DNS lookup which may block the calling thread.

register fun register(): Unit

Security provider registration function for WhitelistTrustManagerProvider