diff options
author | Marc Aldorasi <marc@groundctl.com> | 2017-09-15 13:00:05 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2017-09-16 03:19:35 -0400 |
commit | c8666089c82625a385e5d43df538b951635bccc8 (patch) | |
tree | 732259bb06babe820803fea69c793a6761abb6c8 /lib | |
parent | 843200c5b9b5de41e5acefce593f1229970f18ef (diff) | |
download | curl-c8666089c82625a385e5d43df538b951635bccc8.tar.gz |
schannel: Support partial send for when data is too large
Schannel can only encrypt a certain amount of data at once. Instead of
failing when too much data is to be sent at once, send as much data as
we can and let the caller send the remaining data by calling send again.
Bug: https://curl.haxx.se/mail/lib-2014-07/0033.html
Closes https://github.com/curl/curl/pull/1890
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/schannel.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 83d443fd1..9ca1431bd 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -1047,8 +1047,7 @@ schannel_send(struct connectdata *conn, int sockindex, /* check if the buffer is longer than the maximum message length */ if(len > BACKEND->stream_sizes.cbMaximumMessage) { - *err = CURLE_SEND_ERROR; - return -1; + len = BACKEND->stream_sizes.cbMaximumMessage; } /* calculate the complete message length and allocate a buffer for it */ |