merge TLS client and TLS server code
File daemon/tls.c has almost idential code for TLS client and TLS server, e.g.
-
kres_gnutls_client_pull
vs.kres_gnutls_pull
-
kres_gnutls_client_push
vs.kres_gnutls_push
-
others
We need to refactor this to have only single copy. It will certainly require changes to tls_ctx_t
and related structures, but it seems that we could save good deal of code.