View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000140 | LDMud 3.3 | Networking | public | 2004-11-01 04:42 | 2005-05-15 13:03 |
| Reporter | fippo | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 3.3 | ||||
| Summary | 0000140: TLS not working properly (episode 42) | ||||
| Description | TLS does (still) not work properly when used without pthreads, attempting to read from the connection to early. continue is needed after tls_continue_handshake regardless of what it returns. (tested using OpenSSL and without pthreads) --- comm.orig 2004-10-24 13:40:46.501532128 +0200 +++ comm.c 2004-10-24 13:46:11.440133952 +0200 @@ -2998,10 +2998,9 @@ /* Special case for setting up a TLS connection: don't * attempt IO if the connection is still being set up. */ - if (ip->tls_status == TLS_HANDSHAKING - && !tls_continue_handshake(ip) - ) + if (ip->tls_status == TLS_HANDSHAKING) { + tls_continue_handshake(ip); continue; } #endif | ||||
| Tags | No tags attached. | ||||
| Attached Files | comm.c.diff (2,169 bytes)
*** /mud/src/3-3/src/comm.c 2004-12-04 07:33:45.000000000 +0100
--- /mud/src/3-3-ff/src/comm.c 2004-12-19 10:07:31.000000000 +0100
***************
*** 2998,3007 ****
/* Special case for setting up a TLS connection: don't
* attempt IO if the connection is still being set up.
*/
! if (ip->tls_status == TLS_HANDSHAKING
! && !tls_continue_handshake(ip)
! )
{
continue;
}
#endif
--- 2998,3006 ----
/* Special case for setting up a TLS connection: don't
* attempt IO if the connection is still being set up.
*/
! if (ip->tls_status == TLS_HANDSHAKING)
{
+ tls_continue_handshake(ip);
continue;
}
#endif
***************
*** 3339,3352 ****
, (size_t)(length - ip->chars_ready), ip, MY_FALSE);
#else
#ifdef USE_TLS
! if (ip->tls_status == TLS_INACTIVE)
tls_write(ip, ip->text + ip->chars_ready
, (size_t)(length - ip->chars_ready));
else
! #else
socket_write(ip->socket, ip->text + ip->chars_ready
, (size_t)(length - ip->chars_ready));
- #endif /* USE_TLS */
#endif
ip->chars_ready = length;
}
--- 3338,3350 ----
, (size_t)(length - ip->chars_ready), ip, MY_FALSE);
#else
#ifdef USE_TLS
! if (ip->tls_status != TLS_INACTIVE)
tls_write(ip, ip->text + ip->chars_ready
, (size_t)(length - ip->chars_ready));
else
! #endif /* USE_TLS */
socket_write(ip->socket, ip->text + ip->chars_ready
, (size_t)(length - ip->chars_ready));
#endif
ip->chars_ready = length;
}
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2004-11-01 04:42 | fippo | New Issue | |
| 2004-12-23 11:55 | peng | File Added: comm.c.diff | |
| 2004-12-23 11:56 | peng | Note Added: 0000275 | |
| 2004-12-23 11:57 | peng | Note Edited: 0000275 | |
| 2004-12-23 13:24 |
|
Status | new => resolved |
| 2004-12-23 13:24 |
|
Resolution | open => fixed |
| 2004-12-23 13:24 |
|
Assigned To | => lars |
| 2004-12-23 13:24 |
|
Note Added: 0000276 | |
| 2005-05-15 13:03 |
|
Status | resolved => closed |