diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2017-11-21 11:43:56 -0800 |
---|---|---|
committer | jsorg71 <jay.sorg@gmail.com> | 2017-11-22 16:17:34 -0800 |
commit | a9eb21e6d73d94989dc0fa221824b0625b37b7aa (patch) | |
tree | 94bc4bb2e52f42188dab7fcfa4e247951a64185d /common | |
parent | d7d14d7462f6ec1d6e87f772bda84d5bcf892507 (diff) | |
download | xrdp-proprietary-a9eb21e6d73d94989dc0fa221824b0625b37b7aa.tar.gz xrdp-proprietary-a9eb21e6d73d94989dc0fa221824b0625b37b7aa.zip |
common: avoid 100% cpu on ssl accept, can be fake client
Diffstat (limited to 'common')
-rw-r--r-- | common/ssl_calls.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/ssl_calls.c b/common/ssl_calls.c index 0e12e960..8eec7123 100644 --- a/common/ssl_calls.c +++ b/common/ssl_calls.c @@ -651,6 +651,15 @@ ssl_tls_accept(struct ssl_tls *self, long ssl_protocols, * SSL_ERROR_WANT_READ * SSL_ERROR_WANT_WRITE */ + switch (SSL_get_error(self->ssl, connection_status)) + { + case SSL_ERROR_WANT_READ: + g_sck_can_recv(self->trans->sck, SSL_WANT_READ_WRITE_TIMEOUT); + break; + case SSL_ERROR_WANT_WRITE: + g_sck_can_send(self->trans->sck, SSL_WANT_READ_WRITE_TIMEOUT); + break; + } } else { |