Bug 738568 - Misleading error message when using self-signed SSL certificate for repository
Summary: Misleading error message when using self-signed SSL certificate for repository
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 19
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
Depends On: 738367
TreeView+ depends on / blocked
Reported: 2011-09-15 08:08 UTC by Alexander Todorov
Modified: 2014-02-01 00:04 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 738367
Last Closed: 2014-02-01 00:04:18 UTC
Type: ---

Attachments (Terms of Use)

Description Alexander Todorov 2011-09-15 08:08:36 UTC
+++ This bug was initially created as a clone of Bug #738367 +++

+++ This bug was initially created as a clone of Bug #692118 +++

Created attachment 479513 [details]

Description of problem:

When using https with self-signed certificate one needs to use the --noverifyssl option to the url and repo commands in kickstart. If the user specifies --noverifyssl only for the url command the listed repository is silently accepted although its certificate can't be verified.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Configure HTTPS with self-signed certificate and put into your ks.cfg:

url --url https://example.com/rhel --noverifyssl
repo --name=LoadBalancer --baseurl=https://example.com/rhel/LoadBalancer/

%packages --ignoremissing

Here the repository is loopback mounted DVD under /var/www/html/rhel.

2. Complete the install and reboot.
Actual results:
The repository is silently accepted and the piranha package is installed. 

Expected results:
The repository is ignored because its certificate can't be verified (either with an error dialog or silently) and the piranha package is not installed (because of --ignoremissing).

Additional info:
In anaconda.log we find:

14:01:25,571 INFO    : anaconda called with cmdline = ['/usr/bin/anaconda', '--stage2', 'https://dell-per810-01.lab.bos.redhat.com/rhel/images/install.img', '--dlabel', '--kickstart', '/tmp/ks.cfg', '--graphical', '--selinux', '--lang', 'en_US.UTF-8', '--keymap', 'us', '--repo', 'https://dell-per810-01.lab.bos.redhat.com/rhel', '--noverifyssl']

Which sounds like --noverifyssl for url acts like a global parameter.

--- Additional comment from atodorov@redhat.com on 2011-03-30 09:17:16 EDT ---

I believe the original bug against curl has been fixed. With anaconda 13.21.107 the repo wasn't silently accepted but instead a big error message telling me that repo metadata can't be read was shown. 

Is it possible to show error message telling the user that the SSL certificate of the repository is not trusted instead of showing a generic read error?

--- Additional comment from dcantrell@redhat.com on 2011-05-26 14:54:48 EDT ---


Can you see if RHEL 6.1 GA is still showing this problem?

--- Additional comment from atodorov@redhat.com on 2011-05-27 07:03:17 EDT ---

Hi David,
6.1 GA no longer silently accepts the repository but issues errors which I'm not sure a bug or not. 

Anaconda says unable to read metadata for the repository and when you select to "Continue" it doesn't simply ignore it but shows another error message and the user has to exit the installer. I'm attaching screenshots and a tarball of logs from stage2.

--- Additional comment from atodorov@redhat.com on 2011-05-27 07:03:48 EDT ---

Created attachment 501281 [details]
1st error message

--- Additional comment from atodorov@redhat.com on 2011-05-27 07:03:59 EDT ---

Created attachment 501282 [details]
2nd error message

--- Additional comment from atodorov@redhat.com on 2011-05-27 07:04:19 EDT ---

Created attachment 501283 [details]
tarball with logs from stage2

--- Additional comment from akozumpl@redhat.com on 2011-06-27 09:12:51 EDT ---

The exception is raised by yum with the explanatory error message:

"Cannot retrieve repository metadata (repomd.xml) for repository: %s. Please verify its path and try again"

Besides this no indication is given on why exactly the access has failed, therefore Anaconda can not do any better than displaying a generic message that access to the repo has failed and redisplaying whatever yum gave us. Reassigning to yum, yum maintainers please provide a flag in the exception or similar that will allow us to deduce that the call failed because an ssl connection with unverifiable peer certificate has been attempted.

--- Additional comment from atodorov@redhat.com on 2011-09-15 11:07:20 EEST ---

To sum up. When bug #738566 gets fixed yum needs to pass on the correct error message/error code so that other tools (e.g. anaconda) can interpret it properly.

Comment 1 Alexander Todorov 2011-09-15 08:09:55 UTC
Filing here for anaconda. 

Additional comment from Nils on one of the original bugs:

Hmm, seems this was wrapped in yet another layer I was unaware of, so my
previous approach didn't work since the original exception is caught somewhere
and exception seen by anaconda is basically just "no more mirrors to try". Back
to the drawing board.

Comment 3 Fedora End Of Life 2013-04-03 13:38:11 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:

Note You need to log in before you can comment on or make changes to this bug.