Applied Hiram's patch.
Commit 1511914 from Ken Giusti in branch 'proton/trunk'
[ https://svn.apache.org/r1511914 ]
PROTON-396: set the peer hostname in the SSL context
calling pn_ssl_set_peer_hostname after init seem to work fine.
Attaching simpler fix.
Attaching a patch that fixes this issue.
If you want to keep pn_ssl_t opaque, then I think that the signature on pn_ssl_init needs to change to pass the hostname that's being connected to. pn_ssl_init can then set the ssl->peer_hostname field.