Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Incorrect "No ssl certificates were loaded" warning #5364
Comments
|
Could you run the following script and post the output? (feel free to remove some info about specific certificates if you want): import ssl
# Load default certificates
context = ssl.create_default_context(ssl.Purpose.SERVER_AUTH)
stats = context.cert_store_stats()
print('Stats:', stats)
ca_certs = context.get_ca_certs()
print('{} CA Certificates loaded:'.format(len(ca_certs)))
for cert_dict in ca_certs:
print(cert_dict['subject'])
print() |
|
When it uses a capath instead of a cafile, 'get_ca_certs' or 'cert_store_stats' only returns certificates already used in a connection. (see #5364)
|
I have reverted the change, thanks for the report. It's a bit unfutunate because I would like to check if any certificate is available, but I haven't found any method for getting it. |
Since commit 1a944d8, youtube-dl incorrectly warns that https urls won't work on systems where ssl.get_default_verify_paths() only returns a capath and not a cafile. This is because the list returned by SSLContext.get_ca_certs() "does not contain certificates from capath unless a certificate was requested and loaded by a SSL connection", but _setup_opener() expects it to always return a nonzero value.
Edit: Attached Console output