Hi,
I use M2Crypto library, tring to setup an authenticated secure XML-RPC application.
I encounter certificate verify failure. My SSL context is as follows:
For client, the certificate chain file is cert3, cert2, cert1
For server, chain file is cert5, cert4, cert1
That is, cert3 is verified by cert2; cert2 is verified by cert1.
Client:
ctx.load_cert_chain(chainfile1, key3)
ctx.load_verify(key1)
ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 16)
ctx.set_allow_unknown_ca(0)
Server:
ctx.load_cert_chain(chainfile2, key5)
ctx.load_verify(key1)
ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 16)
ctx.set_allow_unknown_ca(0)
key1 is the private key of cert1, etc.
This gives the error: "certificate verify failed". Does anybody have an idea about what might be the problem?
Thank you..