#3161 - adding trust managers for server connection too

Should be fwd-ported to master


Solved this way to preserve bincompat