Commit df9d8ee
tls: allow obvious key/passphrase combinations
Passphrase is now used whether keys are provided singly, in an array of
string/buffer, or an array of object, where it used to be ignored in
some argument combinations. Specifically, these now work as expected:
key: [encryptedPem],
passphrase: 'passphrase'
and
key: [{pem: encryptedPem}]
passphrase: 'passphrase'
and
key: [{pem: unencryptedPem}]
PR-URL: #10294
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>1 parent ae587f3 commit df9d8eeCopy full SHA for df9d8ee
File tree
Expand file treeCollapse file tree
4 files changed
+97
-30
lines changedOpen diff view settings
Filter options
- doc/api
- lib
- src
- test/parallel
Expand file treeCollapse file tree
4 files changed
+97
-30
lines changedOpen diff view settings
Collapse file
+7-6Lines changed: 7 additions & 6 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
891 | 891 | |
892 | 892 | |
893 | 893 | |
894 | | - |
895 | | - |
896 | | - |
897 | | - |
898 | | - |
899 | | - |
| 894 | + |
| 895 | + |
| 896 | + |
| 897 | + |
| 898 | + |
| 899 | + |
| 900 | + |
900 | 901 | |
901 | 902 | |
902 | 903 | |
|
Collapse file
+3-9Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
78 | 78 | |
79 | 79 | |
80 | 80 | |
81 | | - |
82 | | - |
83 | | - |
84 | | - |
| 81 | + |
| 82 | + |
85 | 83 | |
86 | 84 | |
87 | | - |
88 | | - |
89 | | - |
90 | | - |
91 | | - |
| 85 | + |
92 | 86 | |
93 | 87 | |
94 | 88 | |
|
Collapse file
+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
446 | 446 | |
447 | 447 | |
448 | 448 | |
449 | | - |
| 449 | + |
| 450 | + |
| 451 | + |
| 452 | + |
450 | 453 | |
451 | 454 | |
452 | 455 | |
|
Collapse file
test/parallel/test-tls-passphrase.js
Copy file name to clipboardExpand all lines: test/parallel/test-tls-passphrase.js+83-14Lines changed: 83 additions & 14 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
51 | 51 | |
52 | 52 | |
53 | 53 | |
54 | | - |
| 54 | + |
55 | 55 | |
56 | 56 | |
57 | 57 | |
58 | 58 | |
59 | 59 | |
60 | | - |
61 | 60 | |
62 | 61 | |
63 | 62 | |
64 | 63 | |
65 | 64 | |
66 | 65 | |
67 | 66 | |
68 | | - |
69 | 67 | |
70 | 68 | |
71 | 69 | |
| ||
77 | 75 | |
78 | 76 | |
79 | 77 | |
80 | | - |
| 78 | + |
81 | 79 | |
82 | 80 | |
83 | 81 | |
| ||
101 | 99 | |
102 | 100 | |
103 | 101 | |
104 | | - |
| 102 | + |
105 | 103 | |
106 | 104 | |
107 | 105 | |
108 | 106 | |
109 | 107 | |
110 | | - |
111 | 108 | |
112 | 109 | |
113 | 110 | |
114 | 111 | |
115 | 112 | |
116 | 113 | |
117 | 114 | |
118 | | - |
119 | 115 | |
120 | 116 | |
121 | 117 | |
| ||
127 | 123 | |
128 | 124 | |
129 | 125 | |
130 | | - |
| 126 | + |
131 | 127 | |
132 | 128 | |
133 | 129 | |
| ||
140 | 136 | |
141 | 137 | |
142 | 138 | |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | + |
| 144 | + |
| 145 | + |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | + |
| 152 | + |
| 153 | + |
| 154 | + |
143 | 155 | |
144 | 156 | |
145 | 157 | |
| ||
149 | 161 | |
150 | 162 | |
151 | 163 | |
152 | | - |
| 164 | + |
153 | 165 | |
154 | 166 | |
155 | 167 | |
156 | 168 | |
157 | 169 | |
158 | 170 | |
159 | | - |
| 171 | + |
160 | 172 | |
161 | 173 | |
162 | 174 | |
163 | 175 | |
164 | | - |
165 | 176 | |
166 | 177 | |
167 | 178 | |
168 | | - |
| 179 | + |
169 | 180 | |
170 | 181 | |
171 | 182 | |
172 | 183 | |
173 | 184 | |
174 | 185 | |
175 | 186 | |
176 | | - |
| 187 | + |
177 | 188 | |
178 | 189 | |
179 | 190 | |
| ||
191 | 202 | |
192 | 203 | |
193 | 204 | |
194 | | - |
195 | 205 | |
196 | 206 | |
| 207 | + |
| 208 | + |
| 209 | + |
| 210 | + |
| 211 | + |
| 212 | + |
| 213 | + |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | + |
| 218 | + |
| 219 | + |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
| 225 | + |
| 226 | + |
| 227 | + |
| 228 | + |
| 229 | + |
| 230 | + |
| 231 | + |
| 232 | + |
| 233 | + |
| 234 | + |
| 235 | + |
197 | 236 | |
198 | 237 | |
199 | 238 | |
| ||
203 | 242 | |
204 | 243 | |
205 | 244 | |
| 245 | + |
| 246 | + |
| 247 | + |
| 248 | + |
| 249 | + |
| 250 | + |
| 251 | + |
| 252 | + |
| 253 | + |
| 254 | + |
| 255 | + |
| 256 | + |
| 257 | + |
| 258 | + |
| 259 | + |
| 260 | + |
| 261 | + |
| 262 | + |
| 263 | + |
| 264 | + |
| 265 | + |
| 266 | + |
| 267 | + |
| 268 | + |
| 269 | + |
| 270 | + |
| 271 | + |
| 272 | + |
| 273 | + |
| 274 | + |
0 commit comments