Commit d9ea6c1
tls: fix order of setting cipher before setting cert and key
Set the cipher list and cipher suite before anything else
because @SECLEVEL=<n> changes the security level and
that affects subsequent operations.
Fixes: #36655
Fixes: #49549
Refs: https://github.com/orgs/nodejs/discussions/49634
Refs: https://github.com/orgs/nodejs/discussions/46545
Refs: https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_set_security_level.html
PR-URL: #50186
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>1 parent 194ff6a commit d9ea6c1Copy full SHA for d9ea6c1
File tree
Expand file treeCollapse file tree
4 files changed
+68
-22
lines changedOpen diff view settings
Filter options
- lib/internal/tls
- test
- fixtures/keys
- parallel
Expand file treeCollapse file tree
4 files changed
+68
-22
lines changedOpen diff view settings
Collapse file
lib/internal/tls/secure-context.js
Copy file name to clipboardExpand all lines: lib/internal/tls/secure-context.js+25-22Lines changed: 25 additions & 22 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
144 | 144 | |
145 | 145 | |
146 | 146 | |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
| 169 | + |
| 170 | + |
| 171 | + |
147 | 172 | |
148 | 173 | |
149 | 174 | |
| ||
214 | 239 | |
215 | 240 | |
216 | 241 | |
217 | | - |
218 | | - |
219 | | - |
220 | | - |
221 | | - |
222 | | - |
223 | | - |
224 | | - |
225 | | - |
226 | | - |
227 | | - |
228 | | - |
229 | | - |
230 | | - |
231 | | - |
232 | | - |
233 | | - |
234 | | - |
235 | | - |
236 | | - |
237 | | - |
238 | | - |
239 | 242 | |
240 | 243 | |
241 | 244 | |
|
Collapse file
test/fixtures/keys/agent11-cert.pem
Copy file name to clipboard+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
Collapse file
test/fixtures/keys/agent11-key.pem
Copy file name to clipboard+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
Collapse file
test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js
Copy file name to clipboard+26Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
0 commit comments