A......... [ZBX-8950] minor code refactoring
...G...PS. [ZBXNEXT-1263] fixed a bug when added TLS parameters to agent (in main file only)