Bug 1059002 - On F19, perl's IO::Socket::SSL has problems verifying server's certificate (but works on F20)
Summary: On F19, perl's IO::Socket::SSL has problems verifying server's certificate (b...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-IO-Socket-SSL
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paul Howarth
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-28 23:58 UTC by David Tonhofer
Modified: 2014-02-08 05:04 UTC (History)
3 users (show)

Fixed In Version: perl-IO-Socket-SSL-1.88-2.fc19
Clone Of:
Environment:
Last Closed: 2014-02-08 05:04:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Tonhofer 2014-01-28 23:58:25 UTC
Description of problem:
=======================

I run a DNS update on DynDNS servers using the "ddclient" script.

"ddclient" uses "IO::Socket::SSL" 

  (see http://search.cpan.org/~sullr/IO-Socket-SSL-1.966/lib/IO/Socket/SSL.pm) 

to set up an https connection to 
 
  https://members.dyndns.org

in order to to submit update data.

The root certificate authority certificate for this connection is

------------------
  Data:
      Version: 3 (0x2)
      Serial Number: 33554617 (0x20000b9)
  Signature Algorithm: sha1WithRSAEncryption
      Issuer: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root
      Validity
          Not Before: May 12 18:46:00 2000 GMT
          Not After : May 12 23:59:00 2025 GMT
      Subject: C=IE, O=Baltimore, OU=CyberTrust, CN=Baltimore CyberTrust Root
------------------

This certificate can be found in the bundle file

  /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt

on both Fedora 19 and Fedora 20.

Certificate in PEM format for greppability:

-----BEGIN TRUSTED CERTIFICATE-----
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJ
RTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDe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/OeBHRnDJELqYzmpMDEwFAYIKwYBBQUHAwQGCCsGAQUF
BwMBDBlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290
-----END TRUSTED CERTIFICATE-----


Problem
=======


Running "ddclient" on Fedora 20 
(which has perl-IO-Socket-SSL-1.955-1.fc20.noarch) 
works.

Running "ddclient" on Fedora 19 
(which has perl-IO-Socket-SSL-1.88-1.fc19.noarch) 
results in connection failure:

-----
"WARNING:  cannot connect to members.dyndns.org:443 socket:  IO::Socket::IP configuration failed SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
-----

(Sorry for the horrific formatting, but that is the way it is)


The code to connect to the DynDNS server is:

-----
  $sd = IO::Socket::SSL->new(
            PeerAddr => $peer,
            PeerPort => $port,
            Proto => 'tcp',
            MultiHomed => 1,
            SSL_verify_mode => SSL_VERIFY_PEER,
            Timeout => opt('timeout'),
        );
-----

It turns out that explicitly specifying the trusted CA file in this call makes things work on Fedora 19:

-----
 $sd = IO::Socket::SSL->new(
            PeerAddr => $peer,
            PeerPort => $port,
            Proto => 'tcp',
            MultiHomed => 1,
            SSL_verify_mode => SSL_VERIFY_PEER,
            Timeout => opt('timeout'),
            SSL_ca_file => '/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt'
        );
-----


Conclusion is that "IO::Socket:SSL" does not fetch its trusted CA file from the expected place, at least on Fedora 19.

Additionally, note that "IO::Socket::SSL" doesn't care about the debugging setting as explained in

http://search.cpan.org/~sullr/IO-Socket-SSL-1.966/lib/IO/Socket/SSL.pm#DEBUGGING

for some reason.

Comment 1 Paul Howarth 2014-01-29 10:59:08 UTC
Can you see if this scratch build fixes it for you?

http://koji.fedoraproject.org/koji/taskinfo?taskID=6467289

Comment 2 David Tonhofer 2014-01-29 21:14:48 UTC
Yes it does.


--- Try ---

As user "ddclient"

$ rm ~/ddclient.cache
$ ./wrap_ddclient.sh

WARNING:  cannot connect to members.dyndns.org:443 socket:  IO::Socket::IP configuration failed SSL connect attempt failed with unknown error error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
FAILED:   updating THE_HOST: Could not connect to members.dyndns.org.

--- Upgrade ---

# wget http://kojipkgs.fedoraproject.org//work/tasks/7293/6467293/perl-IO-Socket-SSL-1.88-2.fc19.noarch.rpm
# rpm --query perl-IO-Socket-SSL
perl-IO-Socket-SSL-1.88-1.fc19.noarch
# rpm --upgrade perl-IO-Socket-SSL-1.88-2.fc19.noarch.rpm
# rpm --query perl-IO-Socket-SSL
perl-IO-Socket-SSL-1.88-2.fc19.noarch

--- Try ---

As user "ddclient"

$ rm ~/ddclient.cache
$ ./wrap_ddclient.sh
WARNING:  updating THE_HOST: nochg: No update required; unnecessary attempts to change to the current address are considered abusive

Comment 3 Fedora Update System 2014-01-29 21:38:05 UTC
perl-IO-Socket-SSL-1.88-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/perl-IO-Socket-SSL-1.88-2.fc19

Comment 4 Fedora Update System 2014-01-31 04:26:39 UTC
Package perl-IO-Socket-SSL-1.88-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing perl-IO-Socket-SSL-1.88-2.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1831/perl-IO-Socket-SSL-1.88-2.fc19
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-02-08 05:04:57 UTC
perl-IO-Socket-SSL-1.88-2.fc19 has been pushed to the Fedora 19 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.