gh-60691: allow certificates to be specified from memory#2449
Conversation
Manually resolved conflicts in Lib/test/test_ssl.py Modules/clinic/_ssl.c.h
|
@pitrou @orsenthil @tiran I would very much appreciate to get another round of feedback. I am available for pushing this further, so that maybe we can still land this in 3.7. With all the information present across the issue tracker and this GH conv I want to stress again what's probably easy to miss: this is meant to be a conceptually backwards-compatible change, because the old code path remains intact. Updated:
|
Sorry, something went wrong.
|
I'm still surprised that this functionality needs so much support code, but I'll let @tiran review it. |
Sorry, something went wrong.
Gotcha. At the core that's because there is unfortunately no such thing like That's what this patch adds and what's called Thanks for giving this another quick thought @pitrou, much appreciated. Edit: I've tried to write this before, but I want to retry with more clarity: OpenSSL's In this patch, we create the BIO using the nice existing Python API for Memory BIO management (which was added in Python 3.5). That results in The input to the This is why That
|
Sorry, something went wrong.
tiran
left a comment
There was a problem hiding this comment.
I'm still -1 on this change. @reaperhulk and I are going to have another stab in PEP 543, which will provide a better way to load certs and keys. As Antoine pointed out, it's a lot of additional code. I don't want to maintain additional code and multiple APIs to load key and cert material.
Sorry, something went wrong.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry, something went wrong.
|
@tiran any idea if you'll remove the block on this? More and more people are running into this issue. It appears the perfect is the enemy of the good here -- this bug is outstanding for nearly a decade and waiting for a full rewrite is a classic engineering tarpit. PEP 543 also appears to be moribund, but that's a separate issue. |
Sorry, something went wrong.
|
+1 for @nimish What need to happen to push the thread forward? |
Sorry, something went wrong.
|
Putting social pressure on me is not how you are going to land this PR. As I tried to explain earlier I'm not against the feature per se. But I want to a clean and well designed API with a maintainable implementation. Ultimately I will be the person who has to maintain the code for the next decade or two. We have very few core devs that are familiar with X.509, TLS/SSL, and OpenSSL APIs. I'm doing majority of work and have limited personal (and unpaid) time to contribute to CPython. If you don't agree with my decision you can ask another core dev to overrule me, take over ownership of the ssl module, or appeal to the Python steering council and ask for mediation. In the mean time please watch @brettcannon's keynote from PyCon 2018, https://youtu.be/tzFWz5fiVKU?t=2964 .
I don't agree with your reasoning. If you cannot trust a secure temp directory, then you have more serious problems in your server and application design. Besides private keys should always be encrypted with PKCS#5 v2.0 and a secure passphrase so access to the encrypted key file does not pose a security risk. |
Sorry, something went wrong.
|
@tiran, perhaps a recipe that shows how to use |
Sorry, something went wrong.
|
@tiran Sure, can you then close this as a WONTFIX? It's in limbo right now. Your previous comment just refer to developing a PEP 543 implementation. If this is not going to be merged at all in favor of PEP 543 library, then I'd like to ask that this and the BPO bug be closed with that reason vs being left tantalizingly open. |
Sorry, something went wrong.
|
Sorry, something went wrong.
|
With PEP 543 marked as Withdrawn, what's the roadmap for getting this sort of functionality? |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
So ... |
Sorry, something went wrong.
|
This PR is stale because it has been open for 30 days with no activity. |
Sorry, something went wrong.
|
Unfortunately, closing because of four-year stalemate. The feature is useful by itself but found no support of the SSH part maintainer both from architectural standpoint:
and verification area creep:
|
Sorry, something went wrong.
Decade-long stalemate! :) This issue was originally opened in 2012. No hard feelings. Thanks again for all the valuable contributions here everyone. |
Sorry, something went wrong.
|
Please add make this to the standard library of ssl.py for extended functionality especially for |
Sorry, something went wrong.
Refs:
Compared to the state last discussed via http://bugs.python.org/review/16487, I have
https://bugs.python.org/issue16487