Discussion:
[asio-users] set_verify_callback - the callback is called multiple times on each connection
Eugen Hartmann
2012-12-08 05:00:52 UTC
Permalink
Hi everyone,

I use boost::asio:ssl in software for Windows and verify a server certificate using the verify_peer mode and the set_verify_callback method. In my callback methods I use i2d_X509 to convert the openssl cert context to the DER binary format. Then I create a PCCERT_CONTEXT from the binary DER and verify it using CertGetCertificateChain.

It works and my callback returns true if the cerificate is valid. But asio (or maybe openssl) calls my callback method three times using the same certificate (my server certificate). Is it normal? Why does this happen?

Thanks,
Eugen

Loading...