make TLS trust store optionnal + refactoring