I am trying to set up a peer-authentication mechanism using X509 certs/SSL using M2Crypto.
I generate a root CA (issuer & subject = ca_hostC...) on the client (hostC)
I sign the client Cert locally with this CA (issuer: ca_hostC, subject: hostC) and generate a csr on hostS, copy it to hostC, sign it using the root CA, ca_hostc and move the ca_cert and the signed cert to the hostS.
I generate context:
...