Commit 3725d4c
tls: remove cleartext input data queue
The TLS implementation previously kept a separate buffer for
incoming pieces of data, into which buffers were copied
before they were up for writing.
This removes this buffer, and replaces it with a simple list
of `uv_buf_t`s:
- The previous implementation copied all incoming data into
that buffer, both allocating new storage and wasting time
with copy operations. Node’s streams/net implementation
already has to make sure that the allocated memory stays
fresh until the write is finished, since that is what
libuv streams rely on anyway.
- The fact that a separate kind of buffer, `crypto::NodeBIO`
was used, was confusing: These `BIO` instances are
only used to communicate with openssl’s streams system
otherwise, whereas this one was purely for internal
memory management.
- The name `clear_in_` was not very helpful.
PR-URL: #17883
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>1 parent 25ce458 commit 3725d4cCopy full SHA for 3725d4c
File tree
Expand file treeCollapse file tree
4 files changed
+25
-54
lines changedOpen diff view settings
Filter options
- src
Expand file treeCollapse file tree
4 files changed
+25
-54
lines changedOpen diff view settings
Collapse file
+24-38Lines changed: 24 additions & 38 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
62 | 62 | |
63 | 63 | |
64 | 64 | |
65 | | - |
66 | 65 | |
67 | 66 | |
68 | 67 | |
| ||
95 | 94 | |
96 | 95 | |
97 | 96 | |
98 | | - |
99 | | - |
100 | 97 | |
101 | 98 | |
102 | 99 | |
| ||
119 | 116 | |
120 | 117 | |
121 | 118 | |
122 | | - |
123 | | - |
124 | | - |
125 | | - |
126 | | - |
127 | 119 | |
128 | 120 | |
129 | 121 | |
| ||
183 | 175 | |
184 | 176 | |
185 | 177 | |
186 | | - |
187 | | - |
188 | | - |
189 | | - |
190 | 178 | |
191 | 179 | |
192 | 180 | |
| ||
302 | 290 | |
303 | 291 | |
304 | 292 | |
305 | | - |
| 293 | + |
306 | 294 | |
307 | 295 | |
308 | 296 | |
309 | 297 | |
310 | 298 | |
311 | 299 | |
312 | | - |
| 300 | + |
313 | 301 | |
314 | 302 | |
315 | 303 | |
| ||
496 | 484 | |
497 | 485 | |
498 | 486 | |
| 487 | + |
| 488 | + |
| 489 | + |
499 | 490 | |
500 | 491 | |
| 492 | + |
501 | 493 | |
502 | | - |
503 | | - |
504 | | - |
| 494 | + |
| 495 | + |
| 496 | + |
505 | 497 | |
506 | 498 | |
507 | 499 | |
508 | 500 | |
509 | | - |
510 | 501 | |
511 | 502 | |
512 | 503 | |
513 | | - |
| 504 | + |
514 | 505 | |
515 | 506 | |
516 | 507 | |
| ||
520 | 511 | |
521 | 512 | |
522 | 513 | |
523 | | - |
| 514 | + |
524 | 515 | |
525 | | - |
| 516 | + |
| 517 | + |
| 518 | + |
| 519 | + |
| 520 | + |
| 521 | + |
| 522 | + |
526 | 523 | |
527 | 524 | |
528 | 525 | |
| ||
615 | 612 | |
616 | 613 | |
617 | 614 | |
618 | | - |
619 | | - |
620 | | - |
621 | | - |
622 | | - |
623 | | - |
624 | | - |
625 | | - |
626 | 615 | |
627 | 616 | |
628 | 617 | |
| ||
645 | 634 | |
646 | 635 | |
647 | 636 | |
648 | | - |
649 | | - |
650 | | - |
| 637 | + |
| 638 | + |
| 639 | + |
651 | 640 | |
652 | 641 | |
653 | 642 | |
| ||
817 | 806 | |
818 | 807 | |
819 | 808 | |
820 | | - |
821 | | - |
| 809 | + |
| 810 | + |
822 | 811 | |
823 | 812 | |
824 | 813 | |
825 | 814 | |
826 | 815 | |
827 | 816 | |
828 | | - |
829 | | - |
830 | | - |
831 | 817 | |
832 | 818 | |
833 | 819 | |
| ||
927 | 913 | |
928 | 914 | |
929 | 915 | |
930 | | - |
| 916 | + |
931 | 917 | |
932 | 918 | |
933 | 919 | |
|
Collapse file
+1-2Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
101 | 101 | |
102 | 102 | |
103 | 103 | |
104 | | - |
105 | 104 | |
106 | 105 | |
107 | 106 | |
| ||
158 | 157 | |
159 | 158 | |
160 | 159 | |
161 | | - |
| 160 | + |
162 | 161 | |
163 | 162 | |
164 | 163 | |
|
Collapse file
-13Lines changed: 0 additions & 13 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
99 | 99 | |
100 | 100 | |
101 | 101 | |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
107 | | - |
108 | | - |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
113 | | - |
114 | | - |
115 | 102 | |
116 | 103 | |
117 | 104 | |
|
Collapse file
-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
181 | 181 | |
182 | 182 | |
183 | 183 | |
184 | | - |
185 | 184 | |
186 | 185 | |
187 | 186 | |
|
0 commit comments