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

HTTPS support #9177

Closed
nmr50 opened this issue Apr 13, 2016 · 1 comment
Closed

HTTPS support #9177

nmr50 opened this issue Apr 13, 2016 · 1 comment

Comments

@nmr50
Copy link

@nmr50 nmr50 commented Apr 13, 2016

Hi ! I did notice several times that youtube-dl won't operate on secure server urls (HTTPS).
Here is the log:
C:>youtube-dl -v https://russia.tv/video/show/brand_id/5206/episode_id/1291971/viewtype/picture/
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'-v', u'https://russia.tv/video/show/brand_id/5206/episode_id/1291971/viewtype/picture/']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2016.04.06
[debug] Python version 2.7.10 - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-79107-g30d1213, rtmpdump 2.4
[debug] Proxy map: {}
[generic] picture: Requesting header
WARNING: Could not send HEAD request to https://russia.tv/video/show/brand_id/5206/episode_id/1291971/viewtype/picture/: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
[generic] picture: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)> (caused by URLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)'),))
File "youtube_dl\extractor\common.pyo", line 371, in _request_webpage
File "youtube_dl\YoutubeDL.pyo", line 1935, in urlopen
File "urllib2.pyo", line 431, in open
File "urllib2.pyo", line 449, in _open
File "urllib2.pyo", line 409, in _call_chain
File "youtube_dl\utils.pyo", line 859, in https_open
File "urllib2.pyo", line 1197, in do_open

@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Apr 13, 2016

This website has misconfigured SSL certificates:

$ echo | openssl s_client -connect russia.tv:443 -servername russia.tv
CONNECTED(00000004)
depth=0 C = RU, ST = Moscow, L = Moscow, O = VGTRK, CN = *.russia.tv
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 C = RU, ST = Moscow, L = Moscow, O = VGTRK, CN = *.russia.tv
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:/C=RU/ST=Moscow/L=Moscow/O=VGTRK/CN=*.russia.tv
   i:/C=US/O=thawte, Inc./CN=thawte SSL CA - G2
 1 s:/C=US/O=Thawte, Inc./CN=Thawte SSL CA
   i:/C=US/O=thawte, Inc./OU=Certification Services Division/OU=(c) 2006 thawte, Inc. - For authorized use only/CN=thawte Primary Root CA
(...remaining omitted...)

The subject of the second certificate is not the issuer of the first certificate. As a result, a valid certificate chain can't be formed.

For users, --no-check-certificate can avoid the problem.

@yan12125 yan12125 closed this Apr 13, 2016
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.