#3161 - adding trust managers for server connection too

Forward-port of the trust-manager for server fix.