kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #30295
Re: [PATCH] Add remote lib retrieval to SCH_LEGACY_PLUGIN_CACHE
setting CURLOPT_SSL_VERIFYHOST breaks newer ssl on macOS so likely
better to not just disable that
On 14 August 2017 at 07:26, Badr Hack&Invent <badr@xxxxxxxxxxxxxx> wrote:
> Hi,
>
> Here in the attachment the patch that add the remote lib retrieval.
>
> Badr
> Le 2017-08-13 17:29, Badr Hack&Invent a écrit :
>>
>> Hi,
>>
>> Those couple of days I was checking how to update EESCHEMA to add
>> remote libraries retrieval function.
>>
>> Since am familiar with legacy format, I updated the plugin:
>> SCH_LEGACY_PLUGIN_CACHE in charge of parsing the *.lib files.
>>
>> The idea was to create a new type of library EESchema-REMOTELIBRARY (I
>> put an example in the attachment)
>> The content of this library is the following:
>> EESchema-REMOTELIBRARY Version 1.0
>> URL https://www.example.com/mylib1.lib
>> URL https://www.example.com/mylib2.lib
>> ...
>>
>> This lib file is saved localy and specify the path of each remote
>> library you want to retrieve.
>>
>> The updated code seemlessly check the type of the library, if it is
>> EESchema-LIBRARY it parse it like always, else if it is
>> EESchema-REMOTELIBRARY it download each remote lib and parse it when
>> it is EESchema-LIBRARY (no recusivity with EESchema-REMOTELIBRARY).
>>
>> The impacted files are: sch_legacy_plugin.cpp and sch_legacy_plugin.h
>> -> I implemented the algo and made some tweeks to use LINE_READER
>> instead of FILE_LINE_READER as argument to manage to use
>> STRING_LINE_READER
>>
>> I also modified KICAD_CURL_EASY::KICAD_CURL_EASY() to set the option
>> CURLOPT_SSL_VERIFYHOST to 0 to disable ssl certificate checking in
>> https requests. This modification is not required, but was useflul for
>> our case where our server is behind ssl without certificate on the
>> domaine, just ip addresses.
>>
>> I made a prototype in the attachment, it is woring.
>>
>> I don't know if this modification is inline with the arachitecture of
>> kicad?
>>
>> Badr
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
Follow ups
References