arduino / arduino-fwuploader

A Command Line Tool made to update the firmware and/or add SSL certificates for any Arduino board equipped with WINC or NINA Wi-Fi module.
https://arduino.github.io/arduino-fwuploader/
GNU Affero General Public License v3.0
54 stars 17 forks source link

Fix wrong scrape of Root Certificates #216

Closed alessio-perugini closed 1 year ago

alessio-perugini commented 1 year ago

After #212 we can leverage the usage of ConnectionState.VerifiedChains and per docs:

last element is from Config.RootCAs

So the last element of the VerifiedChains will be the actual RootCA!

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 66.66% and project coverage change: +1.09% :tada:

Comparison is base (f07445f) 12.10% compared to head (7dc0404) 13.19%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #216 +/- ## ========================================== + Coverage 12.10% 13.19% +1.09% ========================================== Files 20 20 Lines 1165 1167 +2 ========================================== + Hits 141 154 +13 + Misses 971 957 -14 - Partials 53 56 +3 ``` | [Flag](https://app.codecov.io/gh/arduino/arduino-fwuploader/pull/216/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=arduino) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/arduino/arduino-fwuploader/pull/216/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=arduino) | `13.19% <66.66%> (+1.09%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=arduino#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/arduino/arduino-fwuploader/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=arduino) | Coverage Δ | | |---|---|---| | [cli/certificates/flash.go](https://app.codecov.io/gh/arduino/arduino-fwuploader/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=arduino#diff-Y2xpL2NlcnRpZmljYXRlcy9mbGFzaC5nbw==) | `0.00% <0.00%> (ø)` | | | [certificates/certutils.go](https://app.codecov.io/gh/arduino/arduino-fwuploader/pull/216?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=arduino#diff-Y2VydGlmaWNhdGVzL2NlcnR1dGlscy5nbw==) | `20.00% <80.00%> (+20.00%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.