Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 504776 - app-portage/squashed-portage-9999: HTTPS uses CAcert.org as CA authority which can break with latest ca-certificates
Summary: app-portage/squashed-portage-9999: HTTPS uses CAcert.org as CA authority whic...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on: 504670
Blocks:
  Show dependency tree
 
Reported: 2014-03-16 10:22 UTC by Justin Lecher (RETIRED)
Modified: 2014-03-21 07:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Lecher (RETIRED) gentoo-dev 2014-03-16 10:22:59 UTC
* Fetching https://repos.j-schmitz.net/git/pub/squashed-portage.git ...
git fetch https://repos.j-schmitz.net/git/pub/squashed-portage.git +HEAD:refs/git-r3/HEAD
fatal: unable to access 'https://repos.j-schmitz.net/git/pub/squashed-portage.git/': SSL certificate problem: self signed certificate in certificate chain
 * ERROR: app-portage/squashed-portage-9999::last-hope failed (unpack phase):
 *   Unable to fetch from any of EGIT_REPO_URI
 *
 * Call stack:
 *     ebuild.sh, line   93:  Called src_unpack
 *   environment, line 3699:  Called git-r3_src_unpack
 *   environment, line 2195:  Called git-r3_src_fetch
 *   environment, line 2189:  Called git-r3_fetch
 *   environment, line 2112:  Called die
 * The specific snippet of code:
 *       [[ -n ${success} ]] || die "Unable to fetch from any of EGIT_REPO_URI";

This one is cacert based.

This is a workaround. Could we somehow handle that from portage side?

git config --global http.sslVerify false
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-16 20:33:38 UTC
I dunno. People are getting a bit touchy when it comes to SSL.

Wasn't Gentoo already in 'we aim to treat cacert as trusted' party?
Comment 2 Justin Lecher (RETIRED) gentoo-dev 2014-03-17 06:06:12 UTC
the cacert root crt is not installed on my system.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-17 06:56:17 UTC
So it seems that Debian removed cacert lately. If you downgraded to ca-certificates-20130906, you'd notice that it works fine.

I will have to investigate further if you want to override the check since it is done in libcurl, I'm afraid.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-17 06:57:43 UTC
Oh, sorry, I just noticed that you provided a work-around. However, we will try to re-introduce cacert.
Comment 5 Justin Lecher (RETIRED) gentoo-dev 2014-03-17 07:24:06 UTC
(In reply to Michał Górny from comment #4)
> Oh, sorry, I just noticed that you provided a work-around. However, we will
> try to re-introduce cacert.

The workaround doesn't seem to work as the portage user's HOME is empty on emerge start.

I added cacert into /usr/local/ so it works. But this is really just a workaround.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-03-17 17:31:17 UTC
Well, the first question would be: is this a problem with your private ebuild or a public ebuild that's going to be hit by users?

As for potential solutions, the best would be to somehow make the process locally able to trust cacert. Disabling SSL validation completely is pretty much equivalent to killing the SSL, so I'd rather not go that far. As for it, can't you just use plain http:// then?
Comment 7 Justin Lecher (RETIRED) gentoo-dev 2014-03-17 17:41:13 UTC
(In reply to Michał Górny from comment #6)
> Well, the first question would be: is this a problem with your private
> ebuild or a public ebuild that's going to be hit by users?

It is a public problem, as every cacert based connection will break. That specific ebuild is publicly available via layman.

> As for potential solutions, the best would be to somehow make the process
> locally able to trust cacert. Disabling SSL validation completely is pretty
> much equivalent to killing the SSL, so I'd rather not go that far. As for
> it, can't you just use plain http:// then?

I can, but again this could also happen with other upstreams where we don't have access to the server.

I would leave the bug open as a tracker and try to get cacert into gentoo instead.
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2014-03-20 08:10:09 UTC
After bug 504670 being fixed this should be also no problem anymore.
Comment 9 SpanKY gentoo-dev 2014-03-20 19:24:42 UTC
this is because the repos.j-schmitz.net domain is using CAcert:
$ openssl s_client -host repos.j-schmitz.net -port 443 -CApath /etc/ssl/certs </dev/null >/dev/null
depth=1 O = Root CA, OU = http://www.cacert.org, CN = CA Cert Signing Authority, emailAddress = support@cacert.org
verify return:1
depth=0 CN = web.not-your-server.de
verify return:1
DONE

you should update the package to depend on ca-certificates[cacert(+)]
Comment 10 Justin Lecher (RETIRED) gentoo-dev 2014-03-21 07:26:22 UTC
(In reply to SpanKY from comment #9)
> this is because the repos.j-schmitz.net domain is using CAcert:
> $ openssl s_client -host repos.j-schmitz.net -port 443 -CApath
> /etc/ssl/certs </dev/null >/dev/null
> depth=1 O = Root CA, OU = http://www.cacert.org, CN = CA Cert Signing
> Authority, emailAddress = support@cacert.org
> verify return:1
> depth=0 CN = web.not-your-server.de
> verify return:1
> DONE
> 
> you should update the package to depend on ca-certificates[cacert(+)]

Exactly. But that report came before you fixed the dropped cacert in ca-certificates.
Comment 11 Justin Lecher (RETIRED) gentoo-dev 2014-03-21 07:29:02 UTC
+  21 Mar 2014; Justin Lecher <jlec@gentoo.org> squashed-portage-9999.ebuild:
+  Depend on cacert in ca-certificates, #504776
+