Commit 3a40e0d
src: cleanup crypto more
* Use ncrypto APIs where appropriate
* Remove obsolete no-longer used functions
* Improve error handling a bit
* move secure heap handling to ncrypto
To simplify handling of boringssl/openssl, move secure
heap impl to ncrypto. Overall the reduces the complexity
of the code in crypto_util by eliminating additional
ifdef branches.
* simplify CryptoErrorStore::ToException a bit
* simplify error handling in crypto_common
* move curve utility methods to ncrypto
* verify that released DataPointers aren't on secure heap
The ByteSource does not currently know how to free a DataPointer
allocated on the secure heap, so just verify.
DataPointers on the secure heap are not something that users can
allocate on their own. Their use is rare. Eventually ByteSource
is going to be refactored around ncrypto APIs so these additional
checks should be temporary.
* simplify some ifdefs that are covered by ncrypto
* cleanup some obsolete includes in crypto_util
PR-URL: nodejs/node#57323
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>1 parent 23b2adf commit 3a40e0d
2 files changed
+96
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
587 | 587 | | |
588 | 588 | | |
589 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
590 | 612 | | |
591 | | - | |
592 | | - | |
| 613 | + | |
| 614 | + | |
593 | 615 | | |
594 | 616 | | |
595 | 617 | | |
| |||
625 | 647 | | |
626 | 648 | | |
627 | 649 | | |
| 650 | + | |
| 651 | + | |
628 | 652 | | |
629 | 653 | | |
630 | 654 | | |
| 655 | + | |
631 | 656 | | |
632 | 657 | | |
633 | 658 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
157 | 200 | | |
158 | 201 | | |
159 | 202 | | |
160 | 203 | | |
161 | | - | |
162 | | - | |
| 204 | + | |
| 205 | + | |
163 | 206 | | |
164 | | - | |
165 | | - | |
| 207 | + | |
| 208 | + | |
166 | 209 | | |
167 | 210 | | |
168 | | - | |
| 211 | + | |
169 | 212 | | |
170 | 213 | | |
| 214 | + | |
171 | 215 | | |
172 | 216 | | |
173 | 217 | | |
| |||
187 | 231 | | |
188 | 232 | | |
189 | 233 | | |
190 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
191 | 239 | | |
192 | 240 | | |
193 | 241 | | |
| |||
218 | 266 | | |
219 | 267 | | |
220 | 268 | | |
| 269 | + | |
221 | 270 | | |
222 | 271 | | |
223 | 272 | | |
| |||
229 | 278 | | |
230 | 279 | | |
231 | 280 | | |
232 | | - | |
| 281 | + | |
| 282 | + | |
233 | 283 | | |
234 | 284 | | |
235 | 285 | | |
236 | 286 | | |
237 | 287 | | |
238 | 288 | | |
| 289 | + | |
239 | 290 | | |
240 | 291 | | |
241 | 292 | | |
242 | 293 | | |
243 | 294 | | |
244 | | - | |
245 | | - | |
246 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
247 | 299 | | |
248 | 300 | | |
249 | | - | |
250 | | - | |
251 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
252 | 304 | | |
253 | 305 | | |
254 | | - | |
255 | | - | |
256 | 306 | | |
257 | 307 | | |
258 | 308 | | |
| |||
3713 | 3763 | | |
3714 | 3764 | | |
3715 | 3765 | | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
3716 | 3770 | | |
3717 | 3771 | | |
3718 | 3772 | | |
| |||
0 commit comments