On Fri, Nov 26, 2004, Peter Sylvester wrote: > > The last line of code is the interesting I assume. >
[snip] > > > > X509_STORE_add_cert(ctx->cert_store,sk_X509_value(p.ca,sk_X509_num(p.ca)-1)); > > The previous line is the one you were looking at. you have have instead used > a buffer with the cert (openssl x509 -C) and d2i_X509 to parse it. > > > The full program can be found in the docs/examples/curlx.c avaiable at > curl.haxx.se > Accessing structure fields directly should be avoided where possible. In this case it can be avoided. The preferred method is to do: X509_STORE *store; store = SSL_CTX_get_cert_store(ctx); X509_STORE_add_cert(store, ...); Steve. -- Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage OpenSSL project core developer and freelance consultant. Funding needed! Details on homepage. Homepage: http://www.drh-consultancy.demon.co.uk ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]