cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Read Certificates from curl

From: David Strauss <david_at_davidstrauss.net>
Date: Fri, 17 May 2013 01:08:03 -0700

On Thu, May 16, 2013 at 11:33 PM, Indtiny s <indtiny_at_gmail.com> wrote:
> I have compiled curl with openssl , now I need to read few variables from
> the certificates during handshake and validate them .
> I need to read below cariables
> 1. policy mapping
> 2. All critical section
> 3. Name constraints .
>
> I need above vars from certificate and validate . if validation fails
> against my requirement I have to reject the certificate .
> is it possible to do this from the curl side or I have to look in openssl
> only ?

I think you want CURLOPT_SSL_CTX_FUNCTION [1]. It won't require you to
fully manage the SSL context, but it is not portable to non-OpenSSL
backends for libcurl.

[1] http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTSSLCTXFUNCTION

--
David Strauss
   | david_at_davidstrauss.net
   | +1 512 577 5827 [mobile]
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-17