Repository navigation
Commit a62b7d5
crypto: harden X.509 conversion and formatting
Check X.509 ASN.1, BIO, time, OID, and DER conversion results.
Preserve invalid-time diagnostics, reject incomplete BIO writes, format
RSA exponents atomically, and avoid truncating long object identifiers.
Preserve valid siblings in legacy name objects by omitting individual
non-text AttributeValues. Continue treating structural failures and
failed conversion of supported string types as conversion failures.
Reject empty or malformed SAN and AIA extensions, and prevent TLS
hostname checks from falling back to commonName after a malformed SAN.
Guard missing public keys and non-NIST curve names. Scope fallible
backend probes without consuming callback errors, parse checkIP()
inputs to exact address bytes, and preserve unrelated backend errors.
Refs: https://hackerone.com/reports/3910015
Refs: https://hackerone.com/reports/3824331
Refs: https://hackerone.com/reports/3944830
Refs: https://hackerone.com/reports/3944847
Assisted-by: Codex
Co-authored-by: Matteo Collina <hello@matteocollina.com>
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Backport-PR-URL: nodejs-private/node-private#1006
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs-private/node-private#9661 parent ec9e5e4 commit a62b7d5
8 files changed
Lines changed: 977 additions & 231 deletions
File tree
- deps/ncrypto
- src/crypto
- test
- cctest
- fixtures
- parallel
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
347 | 360 | | |
348 | | - | |
349 | | - | |
350 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
351 | 378 | | |
352 | 379 | | |
353 | 380 | | |
| |||
760 | 787 | | |
761 | 788 | | |
762 | 789 | | |
763 | | - | |
| 790 | + | |
764 | 791 | | |
765 | 792 | | |
766 | 793 | | |
767 | 794 | | |
768 | | - | |
769 | | - | |
| 795 | + | |
| 796 | + | |
770 | 797 | | |
771 | 798 | | |
772 | 799 | | |
| |||
790 | 817 | | |
791 | 818 | | |
792 | 819 | | |
793 | | - | |
| 820 | + | |
794 | 821 | | |
795 | 822 | | |
796 | 823 | | |
| |||
1009 | 1036 | | |
1010 | 1037 | | |
1011 | 1038 | | |
1012 | | - | |
1013 | | - | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
1014 | 1042 | | |
1015 | 1043 | | |
1016 | 1044 | | |
| |||
0 commit comments