Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergi
Tor
Commits
bc50f082
Commit
bc50f082
authored
4 years ago
by
David Goulet
Browse files
Options
Downloads
Plain Diff
Merge branch 'tor-github/pr/1944'
parents
2eae59e4
3adabaf3
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/ticket40006
+6
-0
6 additions, 0 deletions
changes/ticket40006
src/lib/tls/buffers_tls.c
+3
-2
3 additions, 2 deletions
src/lib/tls/buffers_tls.c
with
9 additions
and
2 deletions
changes/ticket40006
0 → 100644
+
6
−
0
View file @
bc50f082
o Major bugfix (TLS, buffer):
- When attempting to read N bytes on a TLS connection, really try to read
those N bytes. Before that, Tor would stop reading after the first TLS
record which can be smaller than N bytes even though more data was waiting
on the TLS connection socket. The remaining data would have been read at
the next mainloop event. Fixes bug 40006; bugfix on 0.1.0.5-rc.
This diff is collapsed.
Click to expand it.
src/lib/tls/buffers_tls.c
+
3
−
2
View file @
bc50f082
...
...
@@ -59,6 +59,9 @@ read_to_chunk_tls(buf_t *buf, chunk_t *chunk, tor_tls_t *tls,
* Second, the TLS stream's events do not correspond directly to network
* events: sometimes, before a TLS stream can read, the network must be
* ready to write -- or vice versa.
*
* On success, return the number of bytes read. On error, a TOR_TLS_* negative
* code is returned (expect any of them except TOR_TLS_DONE).
*/
int
buf_read_from_tls
(
buf_t
*
buf
,
tor_tls_t
*
tls
,
size_t
at_most
)
...
...
@@ -92,8 +95,6 @@ buf_read_from_tls(buf_t *buf, tor_tls_t *tls, size_t at_most)
return
r
;
/* Error */
tor_assert
(
total_read
+
r
<=
BUF_MAX_LEN
);
total_read
+=
r
;
if
((
size_t
)
r
<
readlen
)
/* eof, block, or no more to read. */
break
;
}
return
(
int
)
total_read
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment