Client Certificate support for TLS

This patch solves issue #1760 . It makes it easy to program very advanced client certificate support.