tls default SNICallback should Check the servername and select the appropriate secure context in Reverse order #34444
tls default SNICallback should Check the servername and select the appropriate secure context in Reverse order #34444masx200 wants to merge 7 commits intonodejs:masterfrom masx200:patch-2
Conversation
|
/cc @mkrawczuk |
|
Fixes: #34110 |
|
servername should also be case-insensitive. |
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
|
Can you add a test? |
I don’t know much about writing tests. Can you ask someone to write tests? |
@masx200 The test cases and features/fixes are usually in the same PR, you can try to write them by referring to an existing test case, the test folder is |
|
@mkrawczuk we should not use Array.prototype.reverse(),This method will change the original array, which produces unnecessary side effects and will cause a great performance loss. |
|
Since we are solving the same problem, could you help me write a test for this pull request? |
|
@masx200 There are linter errors that need fixing. |
|
This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open. |
|
There is already the same pr to solve this problem |
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passestls default SNICallback should Check the servername and select the appropriate secure context in Reverse order
This is useful on HTTPS servers that need to replace ssl/tls certificates frequently, such as using "let's encrypt". When the certificate needs to be replaced, you don't want to restart the HTTPS server, you just need to replace the certificate and key.
If multiple secure contexts are added to the same domain name, the last one added should take effect