Closed jpouellet closed 9 years ago
The verify_callback is called whenever OpenSSL needs to verify the certificate. There are various places in the OpenSSL code where it needs to verify the certificate, that is not only when it validates the chain but also when it checks the purpose etc. For more specific information I must refer you to the source code of OpenSSL. But you can see from the openssl s_client
output that calling the verify_callback multiple times is not specific to IO::Socket::SSL but happens with openssl s_client
too:
depth=0 OU = Domain Control Validated, OU = Gandi Standard Wildcard SSL, CN = *.otr.im
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 OU = Domain Control Validated, OU = Gandi Standard Wildcard SSL, CN = *.otr.im
verify error:num=21:unable to verify the first certificate
verify return:1
Apart from that the leaf certificate does not match the sent certificate chain, that is something is messed up with the configuration of the server.
Not sure what causes it...
Versions of stuff:
Consider the following:
Note that it's the same cert twice. (Sometimes I get it 3 times.)
And for reference: