Commit Graph

45 Commits

Author SHA1 Message Date
Marek Roszko c8f646efb1 ADDED: KiCad update check
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15026
2023-12-13 20:47:40 -05:00
Marek Roszko 464179894d Another set of movement to kicommon 2023-09-26 22:30:42 -04:00
Jon Evans f70b9920cb Fix some warnings 2023-08-10 22:01:55 -04:00
Alex Shvartzkop 712d61d2c1 KICAD_CURL_EASY: add SetPostFields(). 2023-08-10 00:29:19 +03:00
Marek Roszko cbb8835c87 Add policy to alter curl revoke settings on windows 2023-07-13 19:01:04 -04:00
Mark Roszko a38875d6dd Add env variable to turn on curl verbose 2023-07-11 01:42:51 +00:00
Marek Roszko 8fd4909f86 Init curl in InitPgm for thread safety
curl itself highly recommends not initializing curl from within a thread.
Due to the PCM, this can happen in a thread these days.

Pointed out by Érico Rolim in https://gitlab.com/kicad/code/kicad/-/merge_requests/855
2023-04-15 09:18:54 -04:00
qu1ck a6d10c8e97 Enable warnings on msvc 2023-04-11 00:17:50 +00:00
jean-pierre charras 4e27e91b2f KICAD_CURL_EASY: fix compil warnings (avoid using deprecated functions) 2023-03-25 10:18:05 +01:00
Marek Roszko c189053ee5 CURLINFO_SIZE_DOWNLOAD_T is a enum entry, use the version check instead 2023-02-14 23:44:46 -05:00
Marek Roszko 94b5ddbb50 CURLOPT_XFERINFOFUNCTION is an enum entry not a define, the check is invalid 2023-02-14 23:24:02 -05:00
Marek Roszko ac94995f70 Some more wxS 2023-01-16 19:07:50 -05:00
luz paz 79fa911e0e Fix various typos
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Marek Roszko 65d4d6eada Fix typo in comment 2022-01-22 00:07:07 -05:00
Marek Roszko 3ede5f42be Set curl to use the Windows cert store 2022-01-21 22:09:34 -05:00
Ian McInerney 14780ab2e4 Code cleaning un kicad_curl_easy 2021-12-31 11:00:31 +00:00
Seth Hillbrand d60474d3ef Fix missing const 2021-11-24 11:49:13 -08:00
Rachel Mant a0fe10031d Fix curl usage so it builds on CentOS 7 2021-11-24 19:23:35 +00:00
jean-pierre charras bfd09a4d16 Avoid calling deprecated wxPlatformInfo::GetArchName() in more than one place. 2021-11-13 09:52:08 +01:00
Marek Roszko b20317ca84 Some minor cleanup of the proxy detect 2021-11-11 22:47:21 -05:00
Jon Evans 23e0751b2e fix clang build 2021-11-11 10:58:47 -05:00
Marek Roszko e2926f69a5 Add support to fetch windows proxy config for use with curl
Fix https://gitlab.com/kicad/code/kicad/-/issues/9594
2021-11-11 09:30:10 -05:00
Ian McInerney 094fdc1b13 Limit CURL to only support HTTP(S) protocols
We don't actually need any other protocols, so lets disable them
to ensure we can't be affected by any vulnerabilities in that part of
the CURL library.
2021-10-18 00:34:53 +01:00
Wayne Stambaugh ad1ee958b0 Code cleaning. 2021-09-07 15:18:42 -04:00
Jeff Young d61411c853 Fix compile error. 2021-08-30 13:11:42 +01:00
jean-pierre charras f59e66a897 Do not include kicad_curl.h (and therefore curl.h) in kicad_curl_easy.h
curl.h has constraints on Windows (because it includes winsocks2.h) and must be
included before any wxxxx.h.
Because only very few files need curl.h, kicad_curl.h is included only in these files
2021-08-28 15:31:45 +02:00
qu1ck 0f7c0e3872 PCM implementation 2021-08-27 21:11:47 +00:00
Seth Hillbrand ae51e60f70 Set User-Agent Header 2021-08-20 17:24:05 -07:00
Wayne Stambaugh bcd6bddfd4 Start expunging NULL.
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Érico Nogueira 88a8ef949c Remove OpenSSL locking from kicad_curl.
It's fair to assume all libcurl versions in circulation will already be
using OpenSSL>=1.1.0. This code is also unnecessary on platforms that
use other libcurl SSL backends, such as Debian's libcurl-gnutls package.
2021-06-19 19:43:54 +00:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Jon Evans da1ba54188 Expose curl_easy_escape via KICAD_CURL_EASY 2020-02-20 22:07:17 -05:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
Ian McInerney 9e6e9d0910 Replace remaining Boost mutexs with std::mutex
CHANGED: Replaced all MUTEX types with std::mutex
         Replaced all MUTLOCK types with std::lock_guard
2019-05-03 17:13:20 -07:00
John Beard 6ad97e5b5b Kicad Curl: Ignore unused functions for OpenSSL >= 1.1.0
In OpenSSL 1.1.0 and newer, the locking callback macros do nothing.
This causes unused warnings for the static function lock_callback.

Ignore this function on newer OpenSSL builds, but keep
the infrastructure for now.

When OpenSSL's min version is 1.1 or greater, all the locking
infrastructure can be removed.
2019-04-18 16:24:29 +01:00
jean-pierre charras 8c70681b31 Remove useless includes and more fixes to avoid including curl.h in files, when not mandatory. 2017-09-05 08:07:31 +02:00
jean-pierre charras 6ea6c7219a Avoid including curl.h in dialog about (including curl.h creates constraints with wxWidgets especially on Windows)
and remove duplicate code.
2017-09-04 12:53:50 +02:00
Simon Richter 7cee73e8e5 Narrow assumption on OpenSSL use 2016-05-28 13:11:24 -04:00
Simon Wells 145cd47d5c Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
jean-pierre charras 6155cba077 kicad_curl.cpp: fix a compil warning on Windows (regression)
pcb_calculator: fix incorrect formulas shown in attenuators panel. Png files are no more used, and formulas are now html doc files.
2016-01-16 15:27:42 +01:00
Dick Hollenbeck f527b29e68 GitHub plugin: fix threading issues when libcurl is build against openssl.
* Dick Hollenbeck also contributed commit r6440.  I inadvertently forgot to set
  the Bazaar author tag before I committed it.  My apologies.
* Switch to static linking of libcurl and on linux and windows and also
  statically link in only required portions of openssl.
* Add the required thread locks which openssl needs.
* Remove the get curl version call from BASEFRAME since it pulls in curl and
  openssl into every derived wxFrame class link image.
* Remove curl function from PGM_BASE, switch to atexit() instead.  Anything in
  PGM_BASE made the singletops bigger.
* Tested on Linux, Windows, and OSX.
2016-01-14 10:17:13 -05:00
Wayne Stambaugh ef87a0de54 Fix build errors when casting wxString to const char * with some compilers. 2016-01-11 10:44:33 -05:00
Wayne Stambaugh 5c6c2a0661 GitHub plugin: fix potential multiple initialization of libcurl bug.
* Prevent libcurl from inadvertently being initialized twice.
* Dynamically load libcurl only when required.
* Reduce the number of worker threads when loading footprint libraries to
  prevent issues with the GitHub plugin.
2016-01-10 16:44:37 -05:00
unknown e506a4354b Replace avhttp with libcurl: Some fixes:
1. Fixed an assumption somebody originally made in the plugin that std::string had contiguous storage. This is not specced behavior pre C++11 so we gamble by calling .reserve() which should give a far better guarantee.
2. Added copy to clipboard information for curl
3. Removed some openssl references in compiling.md
4. Renamed struct vars to be uppercase to match "public var" code style policy
2015-12-22 15:19:00 +01:00
Mark Roszko e47bc6883d Replace the avhttp library used by the github plugin with libcurl. 2015-12-21 15:30:33 -05:00