[MDEV-5052] RPM key at https://yum.mariadb.org/RPM-GPG-KEY-MariaDB does not work Created: 2013-09-22  Updated: 2014-04-08  Resolved: 2014-04-08

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Daniel Bartholomew
Resolution: Won't Fix Votes: 0
Labels: packaging


 Description   

At least on CentOS 6.3 and Fedora 18 (with SELinux) I get the following:

sudo yum install MariaDB-server MariaDB-client
 
...
 
Total                                           541 kB/s |  58 MB     01:49     
Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
 
 
GPG key retrieval failed: [Errno 14] Peer cert cannot be verified or peer cert invalid

Trying to install it manually, as described at https://mariadb.com/kb/en/installing-mariadb-with-yum/ (on Fedora):

sudo rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
curl: (60) Peer's Certificate has expired.
More details here: http://curl.haxx.se/docs/sslcerts.html
 
curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
error: https://yum.mariadb.org/RPM-GPG-KEY-MariaDB: import read failed(2).

Using http instead of https works. Disabling SELinux also helped.



 Comments   
Comment by Daniel Bartholomew [ 2013-09-23 ]

Very strange. Our *.mariadb.org certificate doesn't expire until 18 Oct 2014. Investigating.

Comment by Daniel Bartholomew [ 2013-09-23 ]

"rpm --import" is using curl to download the certificate. I just tried on one CentOS 6 VM I have access to. Here's the full output using "curl -v" so we can see curl accessing the site's certificate information:

[buildbot@centos6-amd64 ~]$ curl -v https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
* About to connect() to yum.mariadb.org port 443 (#0)
*   Trying 173.203.201.148... connected
* Connected to yum.mariadb.org (173.203.201.148) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* 	subject: CN=*.mariadb.org,OU=Domain Control Validated
* 	start date: Aug 26 18:04:09 2013 GMT
* 	expire date: Oct 18 20:07:53 2014 GMT
* 	common name: *.mariadb.org
* 	issuer: serialNumber=07969287,CN=Go Daddy Secure Certification Authority,OU=http://certificates.godaddy.com/repository,O="GoDaddy.com, Inc.",L=Scottsdale,ST=Arizona,C=US
> GET /RPM-GPG-KEY-MariaDB HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: yum.mariadb.org
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Mon, 23 Sep 2013 19:32:38 GMT
< Server: Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.21 with Suhosin-Patch mod_ssl/2.2.14 OpenSSL/0.9.8k mod_wsgi/2.8 Python/2.6.5
< Last-Modified: Mon, 29 Apr 2013 17:40:26 GMT
< ETag: "15c40f-1b8d-4db836145b680"
< Accept-Ranges: bytes
< Content-Length: 7053
< Content-Type: text/plain
< 
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.10 (GNU/Linux)
 
mQGiBEtohJARBACxvZpWSIMTp/e7BUzSW+WDL7Pl0JDg6v7ZJFGJk9qo+5JXIiis
497Ul0FmVJ6EoyVzfpqe5FyUvqtLCkM6UP5adyvXTHi1KMiYacu2q5yRhDpMKbpM
LkAg23Yyz1yK/d0TsAkerLJ6K1Bh8NIm44Op+qFrDxeYZDIR5Q8WaCdK8wCg/jc8
p/4XaKq74ghUHEX+35qk63UD/0YEsgHrsRQZ42wKNeO8ZUJKqCVHXYJrCq7DhRhn
U5aYnuK3op0JusPN5f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ibmaDzHfc9N1HMRzjTENI7
fyJPNFj9IDkpwk4E3ylrkuVl2KEmYDJ9T9ny4UMnQ7Sb6w59UhxMIFtRTPNpQJWC
WXfhWUAo4WfCiEkEGBECAAkFAktohLgCGwwACgkQy8sIKhu5Q9vThgCeIHzJCz+Q
M8u4iCTrGaJ9w/+jwz4AnRhdXcFVv7svt2qOd374EtCSjv24
=/Od8
-----END PGP PUBLIC KEY BLOCK-----
* Connection #0 to host yum.mariadb.org left intact
* Closing connection #0

So on this machine at least, the request was successful (as was "sudo rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB") . I'll try on other machines to try and duplicate, but no luck with this CentOS box.

Comment by Elena Stepanova [ 2013-09-23 ]

Can it be that my "bundle file isn't adequate", as the error message says it might be?

"curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option.
...
"

Is there something specific I should do to make it adequate?

Here is my output:

[elenst@centos6-64 ~]$ curl -v https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

  • About to connect() to yum.mariadb.org port 443 (#0)
  • Trying 173.203.201.148... connected
  • Connected to yum.mariadb.org (173.203.201.148) port 443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • Remote Certificate has expired.
  • NSS error -8181
  • Closing connection #0
  • Peer certificate cannot be authenticated with known CA certificates
    curl: (60) Peer certificate cannot be authenticated with known CA certificates
    More details here: http://curl.haxx.se/docs/sslcerts.html
    ...
Comment by Daniel Bartholomew [ 2013-09-23 ]

Just a guess, but is the ca-certificates package up to date? It's a mozilla package, but maybe curl makes use of it.

Comment by Elena Stepanova [ 2013-09-23 ]

yum upgrade ca-certificates says there is nothing to update...

[elenst@centos6-64 ~]$ sudo yum info ca-certificates
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile

  • base: mirror.awanti.com
  • extras: mirror.awanti.com
  • updates: centosh5.centos.org
    Installed Packages
    Name : ca-certificates
    Arch : noarch
    Version : 2010.63
    Release : 3.el6_1.5
    Size : 1.3 M
    Repo : installed
    From repo : anaconda-CentOS-201207061011.x86_64
    Summary : The Mozilla CA root certificate bundle
    URL : http://www.mozilla.org/
    License : Public Domain
    Description : This package contains the set of CA certificates chosen by the
    : Mozilla Foundation for use with the Internet PKI.

[elenst@centos6-64 ~]$ sudo yum upgrade ca-certificates
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile

  • base: mirror.awanti.com
  • extras: mirror.awanti.com
  • updates: mirror.yandex.ru
    Setting up Upgrade Process
    No Packages marked for Update
Comment by Elena Stepanova [ 2014-04-08 ]

I found this topic on CentOS forum: https://www.centos.org/forums/viewtopic.php?t=1073 which shows that my problem was not unique at least. It seems it somehow affected self-signed certificates and SSL validation, so it fits. I tried to set sslverify=false in yum config, and it also helped.

However, the problem seems to be gone in CentOS 6.4 and Fedora 19. With the same visible settings (sslverify=true and SELinux enabled), I'm not getting the error there. I tried to copy ca-bundle.crt from CentOS 6.4 (where the key import works) to CentOS 6.3 (where it didn't), but it didn't help, so apparently the cause is somewhere deeper.

Anyway, since Fedora 18 is EOLed, and CentOS 6.3 is 2 releases old (the current one is 6.5), and we were not getting complaints from users about all this, I assume it's safe to close it as "Won't fix". We can always re-open later if needed.

Generated at Thu Feb 08 07:01:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.