[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] evhttp and TLS hostname validation
I've been writing an https client using OpenSSL and libevent 2.1.2,
using this example as a basis:
http://archives.seul.org/libevent/users/Mar-2012/msg00014.html
and it's mostly doing what I want now. However, one thing I still need
to do is check that the certificate has the correct hostname. I'd like
to use this code to do it:
https://github.com/iSECPartners/ssl-conservatory
However, it's not clear to me how to work the validation function
(validate_hostname) into evhttp's control flow. It seems that I would
need to call validate_hostname after the TLS handshake occurs, but
before evhttp starts transferring data. But, I don't know how to get
evhttp to hand over control to me at that time, so I can call
validate_hostname.
How have other people using https with evhttp solved this problem? Is
there a better example that I should look at, rather than the one from
March on the mailing list?
Thanks,
--Patrick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users in the body.