AGPUSH-559 support custom truststore
Refactoring
Merge remote-tracking branch 'tolis-e/master'