Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
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
jarl
tor
Commits
5db21f8f
Commit
5db21f8f
authored
9 years ago
by
Yawning Angel
Committed by
Nick Mathewson
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
OpenSSL 1.1.0-pre5-dev and later made BIO opaque.
Detect newer versions and fix our TLS code to use the new API.
parent
6729d732
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/tortls.c
+10
-0
10 additions, 0 deletions
src/common/tortls.c
with
10 additions
and
0 deletions
src/common/tortls.c
+
10
−
0
View file @
5db21f8f
...
...
@@ -2274,8 +2274,18 @@ tor_tls_get_n_raw_bytes(tor_tls_t *tls, size_t *n_read, size_t *n_written)
* save the original BIO for tls->ssl in the tor_tls_t structure, but
* that would be tempting fate. */
wbio
=
SSL_get_wbio
(
tls
->
ssl
);
#if OPENSSL_VERSION_NUMBER >= OPENSSL_VER(1,1,0,0,5)
/* BIO structure is opaque as of OpenSSL 1.1.0-pre5-dev. Again, not
* supposed to use this form of the version macro, but the OpenSSL developers
* introduced major API changes in the pre-release stage.
*/
if
(
BIO_method_type
(
wbio
)
==
BIO_TYPE_BUFFER
&&
(
tmpbio
=
BIO_next
(
wbio
))
!=
NULL
)
wbio
=
tmpbio
;
#else
if
(
wbio
->
method
==
BIO_f_buffer
()
&&
(
tmpbio
=
BIO_next
(
wbio
))
!=
NULL
)
wbio
=
tmpbio
;
#endif
w
=
BIO_number_written
(
wbio
);
/* We are ok with letting these unsigned ints go "negative" here:
...
...
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