Commit 563b2ed
authored
crypto: use RFC2253 format in PrintGeneralName
For backward compatibility, node uses X509_NAME_oneline to format
X509_NAME entries in PrintGeneralName. However, the format produced by
this function is non-standard and its use is discouraged. It also does
not handle Unicode names correctly.
This change switches to X509_NAME_print_ex with flags that produce an
RFC2253-compatible format. Non-ASCII strings are converted to UTF-8 and
preserved in the output. Control characters are not escaped by OpenSSL
when producing the RFC2253 format because they will be escaped by node
in a JSON-compatible manner afterwards.
PR-URL: #42002
Refs: #42001
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>1 parent 16650ee commit 563b2ed
File tree
2 files changed
+42
-26
lines changed- src/crypto
- test/parallel
2 files changed
+42
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| |||
740 | 745 | | |
741 | 746 | | |
742 | 747 | | |
743 | | - | |
744 | | - | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
750 | 760 | | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
755 | 767 | | |
756 | 768 | | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
757 | 773 | | |
758 | 774 | | |
759 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments