Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 488832 - ? - ERROR: cannot verify www.thc.org's certificate, issued by ‘/C=US/O=GeoTrust, Inc./CN=RapidSSL CA’: Unable to locally verify the issuer's authority.
Summary: ? - ERROR: cannot verify www.thc.org's certificate, issued by ‘/C=US/O=GeoTru...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-21 03:29 UTC by Anton Bolshakov
Modified: 2013-11-12 15:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2013-10-21 03:29:37 UTC
It works with all major browsers but fails using wget:

wget "https://www.thc.org/download.php?t=r&f=thc-pptp-bruter-0.1.4.tar.gz"
--2013-10-21 11:22:51--  https://www.thc.org/download.php?t=r&f=thc-pptp-bruter-0.1.4.tar.gz
Resolving www.thc.org... 199.58.210.16
Connecting to www.thc.org|199.58.210.16|:443... connected.
ERROR: cannot verify www.thc.org's certificate, issued by ‘/C=US/O=GeoTrust, Inc./CN=RapidSSL CA’:
  Unable to locally verify the issuer's authority.
To connect to www.thc.org insecurely, use `--no-check-certificate'.


https://www.ssllabs.com/ssltest/analyze.html?d=thc.org
ssllabs tests shows that the cert has "Extra download" RapidSSL CA.

Does it mean that wget should support that extra download feature?..
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-21 13:58:40 UTC
Er, thc.org needs to fix the certificate or you do what wget suggests (at your own risk, of course).

There is certainly a "bug" here, but Gentoo can't fix it for thc.org....
Comment 2 Anton Bolshakov 2013-10-22 00:29:13 UTC
I think your missed the point that it works for any other browsers including s_client:

bash$ openssl s_client -connect www.thc.org:443

So it is the wget bug.
Comment 3 Anton Bolshakov 2013-10-22 00:42:00 UTC
I'm wrong, the s_client reports the error :
verify error:num=21:unable to verify the first certificate
Verify return code: 21 (unable to verify the first certificate)

Wget uses it probably, so it should be the issue with openssl instead
Comment 4 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-10-22 23:27:53 UTC
Install and/or upgrade ca-certificates, then use --ca-directory=... with wget to point to the right directory; does that work?

The errors are somewhat vague, I wonder if you can get more output by using the --debug parameter; as now it only says it is unable to verify, but it doesn't say why that is the case. Maybe with --debug it does.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-10-22 23:55:54 UTC
(In reply to Anton Bolshakov from comment #3)
> I'm wrong, the s_client reports the error :
> verify error:num=21:unable to verify the first certificate
> Verify return code: 21 (unable to verify the first certificate)
> 
> Wget uses it probably, so it should be the issue with openssl instead

# curl 'https://www.thc.org/download.php?t=r&f=thc-pptp-bruter-0.1.4.tar.gz' -o thc-pptp-bruter-0.1.4.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
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.

So all your web browsers "work" fine and only curl and wget and something called s_client complain?
Comment 6 Anton Bolshakov 2013-10-23 00:45:58 UTC
ok, upgrading to the latest app-misc/ca-certificates-20130906 didn't help.

I found a random website signed by the same cert: https://ssltest12.bbtest.net/
where wget is able to connect.

There are two differences with the setup:
ssltest12 configured with 2 additional certs in the chain
 and
thc.org has 2 undefined fields:
 Organization (O) <Not Part Of Certificate>
 Organizational Unit (OU) <Not Part Of Certificate>

Also, there is a different error with -issuer_checks:
 openssl s_client -connect  www.thc.org:443 -issuer_checks
  verify error:num=29:subject issuer mismatch
Comment 7 Anton Bolshakov 2013-11-12 15:58:08 UTC
ok, thc fixed the cert issue:

>I previously concatenated the rapidssl intermediate CA file to the cert (that's >the correct way by openssl). But for apache this did not work (apache only read >the first certificate in the server certificate - doh). I had to specify it >explicit as SSLCertificateChainFile.

Since I'm not sure is it a bug in the openssl or it is more stricted, I'm closing the bug for now.