added the possibility to change the secureProtocol