curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURL support for new SSL library

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 26 Oct 2017 23:58:42 +0200 (CEST)

On Thu, 26 Oct 2017, Mackey ME via curl-library wrote:

> Now I am in the process of adding the new ssl wrapper under vtls/xx_ssl.c
> and xx_ssl.h.

Wohoo, cool!

> I would like to know which ssl should I take the reference from?

All SSL backends we support are meant to work and should all be fine. Barring
bugs of course. You should thus be able to look at all or any and that should
be fine.

> I am looking into the openssl.c and cyassl.c and found some differences

Maybe a bug? Maybe just solved differently?

> If I have to start with simple implementation of new ssl, where do I begin
> and would like to know if there is any documentation or procedure (flow
> chart, architecture, guidelines, etc) on adding a new ssl library to curl.

Adding support for a new SSL library is not something that happens very
frequently so we have not produced any documentation for it.

You should basically create and populate a 'struct Curl_ssl' with function
pointers and then add that struct to the array in vtls/vtls.c and you're done!

How each function in that struct is supposed to work might of course be a bit
tricky to figure out, but if you still don't understand after having checked
an existing backend or two, feel free to ask here! You can of course also set
a break-point and single-step through a live session to see what's going on.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-10-27