simplifying code, thanks Carlson.
Add client certificate support
Moved add cert to post_message methods.