-
Notifications
You must be signed in to change notification settings - Fork 3k
ssl: Relax requierments on keyfile #10221
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: Relax requierments on keyfile #10221
Conversation
CT Test Results 2 files 66 suites 26m 52s ⏱️ Results for commit c492385. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
|
while this solves the tracing followed by so the second cache_pem cast makes it that the pem_cache only contains the key |
7ad5131 to
868c8bc
Compare
|
Good catch, but I will perhaps make an other cert key pair to have a test case that can be run on also with older versions of cryptolib. |
PR-10046 put to hard requierments on keyfile content. Closes erlang#10217 Closes erlang#10212
868c8bc to
c492385
Compare
| PKey =:= 'PrivateKeyInfo' | ||
| ], | ||
| {ok, PemEntries} = ssl_manager:cache_pem_file(KeyFile, DbHandle), | ||
| [PemEntry] = key_entry(PemEntries), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if more private keys are provided in same file? you might get longer list and match failure here.
should we somehow prepare for that better? have a testcase?
you got it covered below. should it be covered here as well?
maybe it is validated earlier and can't happen ... am I missing sth?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only makes sense to have one key. This is executed in connection processes while the other case "below" is executed before any ssl connection processes exist to enable user processes to find out about file errors from the listen call. On the server side more than one key will have been caught by the listen call (tradeoff here between early failure and some extra overhead). On client side only thing that happens is that some extra entries in the cache for a little while, but connect will return same error as previously.
PR-10046 put to hard requierments on keyfile content.
Closes #10217
Closes #10212