
pkg_name=builtin_ca_bundle
pkg_repository=""
pkg_branch_or_tag="2017-06-07"
pkg_steps="install"

pkg_install() {
    wget https://curl.haxx.se/ca/cacert-$pkg_branch_or_tag.pem
    ofile="src/libmeasurement_kit/net/builtin_ca_bundle.cpp"
    echo "Installing cacert-$pkg_branch_or_tag.pem in MK sources"
    ./build/bundle-ca $pkg_branch_or_tag cacert-$pkg_branch_or_tag.pem $ofile
    clang-format -i $ofile
    # Also save a copy that would be used for regress testing
    cp cacert-$pkg_branch_or_tag.pem test/fixtures/saved_ca_bundle.pem
}
