Bug 1093014 - ssl with certificate that can not be verified
Summary: ssl with certificate that can not be verified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: librepo
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Mlcoch
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1076045
TreeView+ depends on / blocked
 
Reported: 2014-04-30 12:24 UTC by Ales Kozumplik
Modified: 2014-09-30 23:42 UTC (History)
3 users (show)

Fixed In Version: librepo-1.7.3-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-15 00:02:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ales Kozumplik 2014-04-30 12:24:33 UTC
Some https sites are signed by a cert that can be verified through a chain of certs up to one that comes with the distribution. Many different sites just have their own cert, not verifiable by a well-known authority. Some DNF users are running their repos on such servers and currently that fails ("Cannot download repomd.xml: Cannot download repodata/repomd.xml").

DNF has a switch for these situations (sslverify=false) that should instruct librepo to disable the ssl verification (the connection is still encrypted but can not be authenticated and with this switch we say 'thats ok'), but there doesn't seem to be a setting to enable this in librepo. Tomas, could you please provide one? Additionaly, the error message could be improved to say something like 'ssl verification failed', but there's no requirement for that so that's more up to you for now.

Comment 1 Tomas Mlcoch 2014-05-05 14:54:48 UTC
Fixed in HEAD:
https://github.com/Tojaj/librepo/commit/51d32c6cd88ba0139c32793183fd6a236c1ef456
https://github.com/Tojaj/librepo/commit/dbbb485d038641d8c379571485888328ccc872ae

New options LRO_SSLVERIFYPEER and LRO_SSLVERIFYHOST were added

LRO_SSLVERIFYPEER - This option determines whether librepo verifies the authenticity of the peer's certificate. This trust is based on a chain of digital signatures, rooted in certification authority (CA) certificates.


LRO_SSLVERIFYHOST - This option determines whether librepo verifies that the server cert is for the server it is known as.

By default both options are enabled

Comment 2 Ales Kozumplik 2014-05-06 04:46:44 UTC
Thanks Tomas, the two options looks like the right thing to do. Will integrate with DNF as soon as this is in a Fedora build, though no rushing.

Comment 3 Fedora Update System 2014-05-06 08:51:09 UTC
librepo-1.7.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/librepo-1.7.3-1.fc20

Comment 4 Fedora Update System 2014-05-06 21:32:47 UTC
Package librepo-1.7.3-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing librepo-1.7.3-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-6052/librepo-1.7.3-1.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-05-15 00:02:13 UTC
librepo-1.7.3-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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