+++ This bug was initially created as a clone of Bug #678580 +++
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):
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/
Here the repository is loopback mounted DVD under /var/www/html/rhel.
2. Complete the install and reboot.
The repository is silently accepted and the piranha package is installed.
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).
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.
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?
Big error message? What exactly?
Did you try libcurl verbose mode?
I've just realized this bug is against Anaconda. Feel free to ignore my questions if this is not about libcurl...
Can you see if RHEL 6.1 GA is still showing this problem?
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.
Created attachment 501281 [details]
1st error message
Created attachment 501282 [details]
2nd error message
Created attachment 501283 [details]
tarball with logs from stage2
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.
FYI Fedora bugs:
738566 - python-urlgrabber
738367 - yum
738568 - anaconda
Given that this likely requires backports for libcurl/pycurl and urlgrabber, and maybe yum. How late it is in RHEL-6, and how little it should happen in real life, I'm going to close this. It should be fixed in RHEL-7.