util/http: Probe CA path before using pinned cert.
util/http: Probe CA path before using pinned cert.

As the Robot's CA roots frequently seem to change (see 3543a11 and
d7edda3), we now try the system's CA bundle first and if that fails, we
use the hardcoded certificate.

The paths to probe are from the NixOS CA list, which hopefully should be
pretty much distribution-agnostic:

https://github.com/NixOS/nixpkgs/blob/4bfe873298f077e32fd6e05da62ba84e71c072f7/nixos/modules/security/ca.nix#L58-L65

This should make us more robust against changing robot CAs, at least on
(GNU/)Linux distros. I don't have a clue about OS X or Windows, but I'm
happy to accept pull requests or tickets with a working solution.

Signed-off-by: aszlig <ee1aa092358634f9c53f01b5a783726c9e21b35a@redmoonstudios.org>

RedMoonStudios/hetzner