mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-13 22:53:44 +01:00
Merge branch 'maint-0.2.8' into maint-0.2.9
This commit is contained in:
commit
59f4cae68c
3
changes/bug20551
Normal file
3
changes/bug20551
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
o Minor bugfixes (compilation);
|
||||||
|
- Fix implicit conversion warnings under OpenSSL 1.1.
|
||||||
|
Fixes bug 20551; bugfix on 0.2.1.1-alpha.
|
@ -1635,8 +1635,8 @@ tor_tls_new(int sock, int isServer)
|
|||||||
result->state = TOR_TLS_ST_HANDSHAKE;
|
result->state = TOR_TLS_ST_HANDSHAKE;
|
||||||
result->isServer = isServer;
|
result->isServer = isServer;
|
||||||
result->wantwrite_n = 0;
|
result->wantwrite_n = 0;
|
||||||
result->last_write_count = BIO_number_written(bio);
|
result->last_write_count = (unsigned long) BIO_number_written(bio);
|
||||||
result->last_read_count = BIO_number_read(bio);
|
result->last_read_count = (unsigned long) BIO_number_read(bio);
|
||||||
if (result->last_write_count || result->last_read_count) {
|
if (result->last_write_count || result->last_read_count) {
|
||||||
log_warn(LD_NET, "Newly created BIO has read count %lu, write count %lu",
|
log_warn(LD_NET, "Newly created BIO has read count %lu, write count %lu",
|
||||||
result->last_read_count, result->last_write_count);
|
result->last_read_count, result->last_write_count);
|
||||||
@ -2250,7 +2250,7 @@ tor_tls_get_n_raw_bytes(tor_tls_t *tls, size_t *n_read, size_t *n_written)
|
|||||||
{
|
{
|
||||||
BIO *wbio, *tmpbio;
|
BIO *wbio, *tmpbio;
|
||||||
unsigned long r, w;
|
unsigned long r, w;
|
||||||
r = BIO_number_read(SSL_get_rbio(tls->ssl));
|
r = (unsigned long) BIO_number_read(SSL_get_rbio(tls->ssl));
|
||||||
/* We want the number of bytes actually for real written. Unfortunately,
|
/* We want the number of bytes actually for real written. Unfortunately,
|
||||||
* sometimes OpenSSL replaces the wbio on tls->ssl with a buffering bio,
|
* sometimes OpenSSL replaces the wbio on tls->ssl with a buffering bio,
|
||||||
* which makes the answer turn out wrong. Let's cope with that. Note
|
* which makes the answer turn out wrong. Let's cope with that. Note
|
||||||
@ -2271,7 +2271,7 @@ tor_tls_get_n_raw_bytes(tor_tls_t *tls, size_t *n_read, size_t *n_written)
|
|||||||
if (wbio->method == BIO_f_buffer() && (tmpbio = BIO_next(wbio)) != NULL)
|
if (wbio->method == BIO_f_buffer() && (tmpbio = BIO_next(wbio)) != NULL)
|
||||||
wbio = tmpbio;
|
wbio = tmpbio;
|
||||||
#endif
|
#endif
|
||||||
w = BIO_number_written(wbio);
|
w = (unsigned long) BIO_number_written(wbio);
|
||||||
|
|
||||||
/* We are ok with letting these unsigned ints go "negative" here:
|
/* We are ok with letting these unsigned ints go "negative" here:
|
||||||
* If we wrapped around, this should still give us the right answer, unless
|
* If we wrapped around, this should still give us the right answer, unless
|
||||||
|
Loading…
Reference in New Issue
Block a user