From: Patrick Ohly <patrick.ohly@intel.com>
To: Jussi Kukkonen <jussi.kukkonen@intel.com>,
openembedded-core@lists.openembedded.org
Subject: native CA cert bundles (was: Re: [PATCH 3/3] cve-check-tool: Use CA cert bundle in correct sysroot)
Date: Tue, 21 Nov 2017 09:04:47 +0100 [thread overview]
Message-ID: <1511251487.5979.54.camel@intel.com> (raw)
In-Reply-To: <3126cc0be3fdcd228a3bc73e2e58b90447c53ef2.1486668313.git.jussi.kukkonen@intel.com>
On Thu, 2017-02-09 at 21:38 +0200, Jussi Kukkonen wrote:
> Native libcurl looks for CA certs in the wrong place by
> default.
> * Add patch that allows overriding the default CA certificate
> location. Patch is originally from meta-security-isafw.
> * Use the new --cacert to set the correct CA bundle path
>
> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
> ---
> .../cve-check-tool/cve-check-tool_5.6.4.bb | 4 +-
> ...ow-overriding-default-CA-certificate-file.patch | 215
> +++++++++++++++++++++
> 2 files changed, 218 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-devtools/cve-check-tool/files/0001-
> curl-allow-overriding-default-CA-certificate-file.patch
>
> diff --git a/meta/recipes-devtools/cve-check-tool/cve-check-
> tool_5.6.4.bb b/meta/recipes-devtools/cve-check-tool/cve-check-
> tool_5.6.4.bb
> index c78af67..fcd3182 100644
> --- a/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
> +++ b/meta/recipes-devtools/cve-check-tool/cve-check-tool_5.6.4.bb
> @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e8c1458438ead3
> c34974bc0be3a03ed6"
> SRC_URI = "https://github.com/ikeydoherty/${BPN}/releases/download/v
> ${PV}/${BP}.tar.xz \
> file://check-for-malloc_trim-before-using-it.patch \
> file://0001-print-progress-in-percent-when-downloading-
> CVE-db.patch \
> + file://0001-curl-allow-overriding-default-CA-certificate-
> file.patch \
> "
>
> SRC_URI[md5sum] = "c5f4247140fc9be3bf41491d31a34155"
> @@ -39,7 +40,8 @@ do_populate_cve_db() {
> [ -z "${cve_file}" ] && cve_file="${TMPDIR}/cve_check"
>
> bbdebug 2 "Updating cve-check-tool database located in $cve_dir"
> - if cve-check-update -d "$cve_dir" ; then
> + # --cacert works around curl-native not finding the CA bundle
> + if cve-check-update --cacert ${sysconfdir}/ssl/certs/ca-
> certificates.crt -d "$cve_dir" ; then
I went back to this patch to see how the problem was solved, because I
am facing it again elsewhere. Now that I think about it again, I'm
starting to wonder which SSL certificates the native tools really
should trust. Tools like Python or wget are taken from the host, which
means they use the host defaults for SSL. That native tools built with
bitbake then try to use ca-certificates-native looks inconsistent to
me.
There is https://bugzilla.yoctoproject.org/show_bug.cgi?id=9883 open
about some aspect of this, but it doesn't actually address the
underlying question about what the right behavior should be. It's based
on the assumption that libcurl-native should always use ca-
certificates-native.
Thoughts anyone?
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
next prev parent reply other threads:[~2017-11-21 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-09 19:38 [PATCH 0/3] Fix cve-check (for recipe sysroots) Jussi Kukkonen
2017-02-09 19:38 ` [PATCH 1/3] cve-check.bbclass: Fix dependencies Jussi Kukkonen
2017-02-09 19:38 ` [PATCH 2/3] cve-check-tool: Fixes for recipe sysroots Jussi Kukkonen
2017-02-09 19:38 ` [PATCH 3/3] cve-check-tool: Use CA cert bundle in correct sysroot Jussi Kukkonen
2017-11-21 8:04 ` Patrick Ohly [this message]
2017-11-21 12:06 ` native CA cert bundles (was: Re: [PATCH 3/3] cve-check-tool: Use CA cert bundle in correct sysroot) Otavio Salvador
2017-11-21 12:21 ` Patrick Ohly
2017-11-21 12:52 ` Otavio Salvador
2017-02-09 19:59 ` ✗ patchtest: failure for Fix cve-check (for recipe sysroots) Patchwork
2017-02-09 21:41 ` Leonardo Sandoval
2017-02-10 11:55 ` [PATCH 0/3] " Alexander Kanavin
2017-02-10 13:04 ` Burton, Ross
2017-02-10 13:11 ` Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1511251487.5979.54.camel@intel.com \
--to=patrick.ohly@intel.com \
--cc=jussi.kukkonen@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox