This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年06月26日 13:05 by messa, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg245852 - (view) | Author: Petr Messner (messa) | Date: 2015年06月26日 13:05 | |
Please, is it possible to put more information about the purpose parameter to the documentation of ssl.create_default_context()? It's not obvious that SERVER_AUTH should be used for client sockets and not server sockets. It took me a while to discover this, while all I was getting was only "SSLEOFError: EOF occurred in violation of protocol" (which is also not helpful). This is especially confusing, because OpenSSL uses serverAuth and clientAuth (for extendedKeyUsage configuration) in the exactly opposite meaning. |
|||
| msg245853 - (view) | Author: Christian Heimes (christian.heimes) * (Python committer) | Date: 2015年06月26日 13:29 | |
Python uses serverAuth and clientAuth in the exact same meaning as EKU (extended key usage). In order to create X.509 cert for a web server, it should have EKU "SSL/TLS Web Server Authentication". On the other hand a client must validate the cert for a specific purpose, too. So the client creates a context with purpose SERVER_AUTH. This loads only trust anchors which are flagged with EKU "SSL/TLS Web Server Authentication". For TLS/SSL server it is the other way around. The server side uses a context with CLIENT_AUTH to load only root certs that can validate client certs. Other purposes aren't supported because Python's ssl does neither support S/MIME nor code signing. https://docs.python.org/2/library/ssl.html#ssl.SSLContext.load_default_certs explains the purpose flags, too. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:18 | admin | set | github: 68704 |
| 2017年09月07日 02:37:15 | christian.heimes | set | status: open -> closed resolution: out of date stage: resolved |
| 2016年09月15日 07:54:16 | christian.heimes | set | components: + SSL |
| 2016年09月08日 15:25:40 | christian.heimes | set | versions: + Python 3.6, Python 3.7, - Python 3.4 |
| 2015年06月27日 01:10:36 | martin.panter | set | nosy:
+ martin.panter |
| 2015年06月26日 13:29:40 | christian.heimes | set | nosy:
+ christian.heimes messages: + msg245853 |
| 2015年06月26日 13:05:40 | messa | create | |