Hi Egil,<br><br>I&#39;m not sure about the version that you listed (typo maybe?). If I am understanding your question correctly, you want to look at the load_cert_chain() method in the Context class. It takes the filename where the certificate is stored. 
<br><br>Latitia<br><br><div><span class="gmail_quote">On 3/15/07, <b class="gmail_sendername">Egil Möller</b> &lt;<a href="mailto:redhog@redhog.org">redhog@redhog.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi!<br>In modern M2Crypto:s (0.1.16) you can load certificates (including CA<br>cert) to use to verify the peer&#39;s cert into a context from e.g. a<br>database with:<br><br>def loadCert(ctx, certDataAsString):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;store = 
ctx.get_cert_store()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bio = M2Crypto.BIO.MemoryBuffer()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bio.write(certDataAsString)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;store.add_x509(M2Crypto.X509.load_cert_bio(bio))<br><br>But how do you load your own cert and key from a string, that is, a call
<br>analogous to ctx.load_cert(filename)?<br><br>I am developing a peer-to-peer protocol, and would like to store<br>everything at a node in its database, even the certificate and key for<br>the node.<br><br>Thanks in advance,
<br>Egil Möller<br><br></blockquote></div><br>