aboutsummaryrefslogtreecommitdiff
path: root/lib/vtls
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2014-02-18 21:14:09 +0100
committerDan Fandrich <dan@coneharvesters.com>2014-02-18 21:14:09 +0100
commit8749bbe7fd32da298459b62a80d61fd715c75abf (patch)
tree9b245e21d49662d2117bdf09bcb022122531d261 /lib/vtls
parent03c288202ed159a2a9e953f59e58f69a86eda79b (diff)
axtls: comment the call ssl_read repeatedly loop
Diffstat (limited to 'lib/vtls')
-rw-r--r--lib/vtls/axtls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/vtls/axtls.c b/lib/vtls/axtls.c
index 384c27467..d10332629 100644
--- a/lib/vtls/axtls.c
+++ b/lib/vtls/axtls.c
@@ -390,7 +390,7 @@ static CURLcode connect_finish(struct connectdata *conn, int sockindex)
/*
* Use axTLS's non-blocking connection feature to open an SSL connection.
* This is called after a TCP connection is already established.
-*/
+ */
CURLcode Curl_axtls_connect_nonblocking(
struct connectdata *conn,
int sockindex,
@@ -415,6 +415,9 @@ CURLcode Curl_axtls_connect_nonblocking(
if(conn->ssl[sockindex].connecting_state == ssl_connect_2) {
/* Check to make sure handshake was ok. */
if(ssl_handshake_status(conn->ssl[sockindex].ssl) != SSL_OK) {
+ /* Loop to perform more work in between sleeps. This is work around the
+ fact that axtls does not expose any knowledge about when work needs
+ to be performed. This can save ~25% of time on SSL handshakes. */
for(i=0; i<5; i++) {
ssl_fcn_return = ssl_read(conn->ssl[sockindex].ssl, NULL);
if(ssl_fcn_return < 0) {