Relationships between TrustManagers and KeyManagers

Historically there has been confusion regarding the jobs of TrustManagers and KeyManagers interfaces. In summary, here are the primary responsibilities of each manager type:
Table 1. Manager types and funtions
Type Function
TrustManager Determines whether the remote authentication credentials (and thus the connection) should be trusted.
KeyManager Determines which authentication credentials to send to the remote host.