> >         
> > 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.

Thanks for the hint (correction). 
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to