Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL: CERTIFICATE_VERIFY_FAILED - Mac, python 2 and 3 #5605

Closed
truth1ness opened this issue May 4, 2015 · 13 comments
Closed

SSL: CERTIFICATE_VERIFY_FAILED - Mac, python 2 and 3 #5605

truth1ness opened this issue May 4, 2015 · 13 comments

Comments

@truth1ness
Copy link

@truth1ness truth1ness commented May 4, 2015

Getting the error below with youtube-dl -v https://www.youtube.com/watch?v=Cgm3r-G0cMQ

This on on Mac Yosemite Python 3.4.3. Also, I ran in my systemwide Python 2.7.9 and the -v for that is pasted further down.

ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)> (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))

Full -v output Python 3:

(testenv3)testenv3 > youtube-dl -v https://www.youtube.com/watch?v=Cgm3r-G0cMQ
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'https://www.youtube.com/watch?v=Cgm3r-G0cMQ']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.04.26
[debug] Python version 3.4.3 - Darwin-14.3.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] Cgm3r-G0cMQ: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)> (caused by URLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:600)'),))
  File "/Users/mmarotta/.virtualenvs/testenv3/lib/python3.4/site-packages/youtube_dl/extractor/common.py", line 315, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/Users/mmarotta/.virtualenvs/testenv3/lib/python3.4/site-packages/youtube_dl/YoutubeDL.py", line 1701, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/urllib/request.py", line 463, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/urllib/request.py", line 481, in _open
    '_open', req)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/urllib/request.py", line 441, in _call_chain
    result = func(*args)
  File "/Users/mmarotta/.virtualenvs/testenv3/lib/python3.4/site-packages/youtube_dl/utils.py", line 719, in https_open
    req, **kwargs)
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/urllib/request.py", line 1184, in do_open
    raise URLError(err)

Full -v output Python 2.7.9

~ > youtube-dl -v https://www.youtube.com/watch?v=Cgm3r-G0cMQ
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=Cgm3r-G0cMQ']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.04
[debug] Git HEAD: 436a759
[debug] Python version 2.7.9 - Darwin-14.3.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] Cgm3r-G0cMQ: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)> (caused by URLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),))
  File "/usr/local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 312, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1708, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/site-packages/youtube_dl/utils.py", line 720, in https_open
    req, **kwargs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 4, 2015

Could you try with the soultions listed in these comments: #5317 (comment) and #5317 (comment)?

@truth1ness
Copy link
Author

@truth1ness truth1ness commented May 4, 2015

Unfortunately brew uninstall/install openssl did not fix it. Here is my -v output post re-install and the outputs from the re-install logs below that.

~ > youtube-dl -v https://www.youtube.com/watch?v=Cgm3r-G0cMQ
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=Cgm3r-G0cMQ']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.05.04
[debug] Git HEAD: 436a759
[debug] Python version 2.7.9 - Darwin-14.3.0-x86_64-i386-64bit
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] Cgm3r-G0cMQ: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)> (caused by URLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)'),))
  File "/usr/local/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 312, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/usr/local/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 1708, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/local/lib/python2.7/site-packages/youtube_dl/utils.py", line 720, in https_open
    req, **kwargs)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)

brew reinstall openssl

~ > brew uninstall openssl
Uninstalling /usr/local/Cellar/openssl/1.0.2a-1...
~ > brew install openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2a-1.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/openssl-1.0.2a-1.yosemite.bottle.tar.gz
==> Pouring openssl-1.0.2a-1.yosemite.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl/certs

and run
  /usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local.

Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.

Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries

Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:

    LDFLAGS:  -L/usr/local/opt/openssl/lib
    CPPFLAGS: -I/usr/local/opt/openssl/include

==> Summary
🍺  /usr/local/Cellar/openssl/1.0.2a-1: 463 files,  18M
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 4, 2015

Maybe you also need to remove the existing certs after uninstalling: rm -rf /usr/local/etc/openssl. Anyway this is not a problem in youtube-dl, since other software using openssl will also fail (you can try with wget 'https://www.youtube.com/watch?v=Cgm3r-G0cMQ')

@truth1ness
Copy link
Author

@truth1ness truth1ness commented May 5, 2015

Thanks. I uninstalled openssl, removed that folder, and reinstalled. Still doesn't work for either youtube-dl or wget. Ugh. Any other ideas?

@truth1ness
Copy link
Author

@truth1ness truth1ness commented May 5, 2015

I tried running (testenv3)testenv3 > echo | openssl s_client -connect youtube.com:443 which someone asked about in another thread and here is the output. I honestly don't even know what ssl does so I have no idea what to make of this. I seem to get the same verify error:num=20:unable to get local issuer certificate no matter what domain I enter.

Btw, does this mean my whole computer/internet is insecure?

(testenv3)testenv3 > echo | openssl s_client -connect youtube.com:443
CONNECTED(00000003)
depth=2 /C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
verify return:0
---
Certificate chain
 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
   i:/C=US/O=Google Inc/CN=Google Internet Authority G2
 1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
   i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
 2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
   i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHgzCCBmugAwIBAgIILW9oBp50RiIwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTUwNDIyMTMyMTQwWhcNMTUwNzIxMDAwMDAw
WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEVMBMGA1UEAwwMKi5n
b29nbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgDJKgSnX
rfthwCCB0gc5KDN02J+Uj2xgKeF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
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
issuer=/C=US/O=Google Inc/CN=Google Internet Authority G2
---
No client certificate CA names sent
---
SSL handshake has read 3999 bytes and written 444 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : RC4-SHA
    Session-ID: 10775C02A73AB2D86F618C26491521BAC0EF8FAB670C7BEFC7F1FAA223064A57
    Session-ID-ctx: 
    Master-Key: B7D9845159D987F16A7E1A847C049E1E2A703590C4846731ACCB12B34A5056900BAFEF75A461E999A786B258C12E87AC
    Key-Arg   : None
    Start Time: 1430785075
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
DONE
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 5, 2015

You have to specify the certificates file: /usr/local/bin/openssl s_client -connect youtube.com:443 -CAfile /usr/local/etc/openssl/cert.pem.

Btw, does this mean my whole computer/internet is insecure?

No (I didn't want to scare you ;)), OS X and Firefox don't use openssl. It just means that the homebrew provided openssl (and everything that use it: wget, python, youtube-dl) can't verify if the youtube certificates are correct.
You'll probably get a better support from Homebrew, since they probably know better how to fix it.

@jaimeMF jaimeMF closed this May 5, 2015
@truth1ness
Copy link
Author

@truth1ness truth1ness commented May 5, 2015

Ah, ok thanks.

You have to specify the certificates file: /usr/local/bin/openssl s_client -connect youtube.com:443 -CAfile /usr/local/etc/openssl/cert.pem.

When you say /usr/local/bin/openssl did you actually mean /usr/local/etc/openssl like you used in the rm command? the local/bin/openssl folder doesn't exist. Just wanted to check before running this command.

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 5, 2015

Sorry, when you have openssl installed with homebrew you have to run /usr/local/opt/openssl/bin/openssl s_client -connect youtube.com:443 -CAfile /usr/local/etc/openssl/cert.pem (instead of just openssl s_client -connect youtube.com:443), because by default it doesn't make it directly available as openssl.

@truth1ness
Copy link
Author

@truth1ness truth1ness commented May 5, 2015

Hmm, this is what I get when I enter that command (thanks so much for continuing to help me with this, btw). Also, I have to keyboard escape out of it to get back to my bash prompt for some reason.

testenv3 > /usr/local/opt/openssl/bin/openssl s_client -connect youtube.com:443 -CAfile /usr/local/etc/openssl/cert.pem
CONNECTED(00000003)
depth=2 C = US, O = GeoTrust Inc., CN = GeoTrust Global CA
verify error:num=20:unable to get local issuer certificate
---
Certificate chain
 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
   i:/C=US/O=Google Inc/CN=Google Internet Authority G2
 1 s:/C=US/O=Google Inc/CN=Google Internet Authority G2
   i:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
 2 s:/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA
   i:/C=US/O=Equifax/OU=Equifax Secure Certificate Authority
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIHgzCCBmugAwIBAgIILW9oBp50RiIwDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UE
BhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl
cm5ldCBBdXRob3JpdHkgRzIwHhcNMTUwNDIyMTMyMTQwWhcNMTUwNzIxMDAwMDAw
WjBmMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN
TW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEVMBMGA1UEAwwMKi5n
b29nbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgDJKgSnX
rfthwCCB0gc5KDN02J+Uj2xgKeFusyLnCtCv/QYKJjXDXYceViX9aF+GSFZZe1GK
uNP0qYh8/v31zTz0SE5UaQyn9uqz33wwU43Af94J5nnjA6PCZrNnHzhOaDputEgO
y3UwEPSgatVhcVEgdqXeisQOnG7SpRuzfMs/HEsiSmc784+rSBAZKktspXDd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b22CCyoueXRp
bWcuY29tggthbmRyb2lkLmNvbYIEZy5jb4IGZ29vLmdsghRnb29nbGUtYW5hbHl0
aWNzLmNvbYIKZ29vZ2xlLmNvbYISZ29vZ2xlY29tbWVyY2UuY29tggp1cmNoaW4u
Y29tggh5b3V0dS5iZYILeW91dHViZS5jb22CFHlvdXR1YmVlZHVjYXRpb24uY29t
MGgGCCsGAQUFBwEBBFwwWjArBggrBgEFBQcwAoYfaHR0cDovL3BraS5nb29nbGUu
Y29tL0dJQUcyLmNydDArBggrBgEFBQcwAYYfaHR0cDovL2NsaWVudHMxLmdvb2ds
ZS5jb20vb2NzcDAdBgNVHQ4EFgQUiM602EJkc9+TR6CsmcXD7cBI35YwDAYDVR0T
AQH/BAIwADAfBgNVHSMEGDAWgBRK3QYWG7z2aLV29YG2u2IaulqBLzAXBgNVHSAE
EDAOMAwGCisGAQQB1nkCBQEwMAYDVR0fBCkwJzAloCOgIYYfaHR0cDovL3BraS5n
b29nbGUuY29tL0dJQUcyLmNybDANBgkqhkiG9w0BAQUFAAOCAQEAUi0NYc8EEax2
6DpqB9ZWYQTbgmIADA2ksPZtJ1MUJXbENoUlILIcv4qFgoPXqZPDLhuBZ+aJmfXL
3H4Z4piBAZC11nGioZaubKxqYa/ujKgmnjYeGaFGPWocYZOw2RmZwp/RLaMP64JH
Y6QgyEZlbX//lV6e4PjFSnr0y90Ksrl1PsvwUFV8dTfhI079OXtqD6sqEEf+uRao
7HHH50ZKGkb1Aa5e8xXx9DOo6siyAEVRGb1+uxnGsPZW2v3UmNPXmp5YdKmPifxT
5lGe54TepRde2y+UvsyeFAjroSnm10fnkj777peFg/sK3Gs1tAbNgw6SDOPVnvBz
q59oNKUisw==
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=*.google.com
issuer=/C=US/O=Google Inc/CN=Google Internet Authority G2
---
No client certificate CA names sent
Peer signing digest: SHA512
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 4500 bytes and written 474 bytes
---
New, TLSv1/SSLv3, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : ECDHE-RSA-AES128-GCM-SHA256
    Session-ID: BE12D954ABDF74775FCCDBD467C6494D2F5F93FC5C582F6086B42CB7F5A3C5CD
    Session-ID-ctx:
    Master-Key: 57AB75014EBE5C3CF5B617033D2EAFCA29780953F00FAE65C7BA9945202474717AA713F7E79B51C88007DE2A88559F62
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    TLS session ticket lifetime hint: 100800 (seconds)
    TLS session ticket:
    0000 - 6e 35 b6 f5 87 7f fc 8c-bd 57 35 a3 b9 89 15 4d   n5.......W5....M
    0010 - fe 9b d1 cf 05 7e b1 46-66 06 83 cd 83 ec ea f7   .....~.Ff.......
    0020 - 3f 2a a5 56 97 b3 76 c1-0d eb a4 d4 57 fd bb 23   ?*.V..v.....W..#
    0030 - a6 5a ea 63 17 cd 8d 47-f1 80 a5 d9 c8 74 d7 0f   .Z.c...G.....t..
    0040 - b2 f7 63 5a 9a fd 0f 2f-3d 95 96 07 54 89 51 cf   ..cZ.../=...T.Q.
    0050 - 7b d2 79 3f 9b ff 14 ed-af d8 cf dd 29 bd de 3d   {.y?........)..=
    0060 - 70 c1 ff 6b 5d d3 78 a7-62 f4 df 25 05 be 2c 94   p..k].x.b..%..,.
    0070 - 96 20 54 a2 70 8d 25 5c-75 93 ab f1 0b 1a 2a 29   . T.p.%\u.....*)
    0080 - 5b 1c 2c fb 64 80 73 84-c7 0a 27 f9 57 39 d0 81   [.,.d.s...'.W9..
    0090 - df dd 17 ff 3e 0a 37 5e-32 d3 8b 65 49 6f a4 e9   ....>.7^2..eIo..
    00a0 - cf 01 76 3b                                       ..v;

    Start Time: 1430847495
    Timeout   : 300 (sec)
    Verify return code: 20 (unable to get local issuer certificate)
---

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 5, 2015

The important info is in the last line Verify return code: 20 (unable to get local issuer certificate), when the certificate can be verified it prints Verify return code: 0 (ok). As I said: you should try to get help in the Homebrew issue tracker, I only have OX 10.9 so I can't offer too much help. Alternatively you could try the official python builds at https://www.python.org/downloads/, but you loose the ability to use Homebrew for managing it.

Also, I have to keyboard escape out of it to get back to my bash prompt for some reason

It reads from stdin and sends that message, that's why echo | ... was used in your first example to send an empty message.

@truth1ness
Copy link
Author

@truth1ness truth1ness commented May 7, 2015

I think to fully rule this out I should try testing this with my mac's built in 2.7.6 python but I'm not sure how to specify this through Terminal (since the 2.7.9 brew version overrides the system 2.7.6).

I tried ~ > /usr/bin/python wget 'https://www.youtube.com/watch?v=Cgm3r-G0cMQ' for example where /usr/bin/python is my 2.7.6 location but I got a folder not found error. I went into the /usr/bin/python shell and entered wget 'https://www.youtube.com/watch?v=Cgm3r-G0cMQ' and it didn't recognize it.

How exactly would I tell Terminal to Run wget or youtube-dl but use mac's system 2.7.6 python instead of homebrew's 2.7.9?

@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented May 7, 2015

How exactly would I tell Terminal to Run wget/ or youtube-dl but use mac's system 2.7.6 python instead of homebrew's 2.7.9?

/usr/bin/python $(which youtube-dl). But keep in mind that python 2.7.6 can't check for certificates, so it's like running youtube-dl with --no-check-certificate.

@truth1ness
Copy link
Author

@truth1ness truth1ness commented May 7, 2015

Ah, ok. So much for that plan, lol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.