aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-09-21 03:18:00 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2014-09-21 03:43:14 +0200
commitfa2780a40da9313337b7cca0ba68783a6829b5e3 (patch)
treef6745f7d75c0be19315e7f3c0fb715f6a3716ecd
parentaeb1012997acabdd280557487d006a73c29cd5eb (diff)
downloadponymap-fa2780a40da9313337b7cca0ba68783a6829b5e3.tar.gz
ponymap-fa2780a40da9313337b7cca0ba68783a6829b5e3.tar.xz
ponymap-fa2780a40da9313337b7cca0ba68783a6829b5e3.zip
Fix the TLS/SSL transport
-rw-r--r--ponymap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ponymap.c b/ponymap.c
index 1dc1792..0f0b64e 100644
--- a/ponymap.c
+++ b/ponymap.c
@@ -1003,6 +1003,7 @@ transport_tls_init (struct unit *u)
struct transport_tls_data *data = xcalloc (1, sizeof *data);
data->ssl = ssl;
+ // XXX: maybe set `ssl_rx_want_tx' to force a handshake?
u->transport_data = data;
return true;
}
@@ -1063,10 +1064,10 @@ transport_tls_on_readable (struct unit *u)
case SSL_ERROR_ZERO_RETURN:
return TRANSPORT_IO_EOF;
case SSL_ERROR_WANT_READ:
- return true;
+ return TRANSPORT_IO_OK;
case SSL_ERROR_WANT_WRITE:
data->ssl_rx_want_tx = true;
- return true;
+ return TRANSPORT_IO_OK;
case XSSL_ERROR_TRY_AGAIN:
continue;
default: