CLEANUP: ssl: use the refcount for the SSL_CTX'

Use the refcount of the SSL_CTX' to free them instead of freeing them on
certains conditions. That way we can free the SSL_CTX everywhere its
pointer is used.
2 files changed