curl-library
RE: SSL/TLS support using Windows SSPI Schannel API
Date: Mon, 23 Apr 2012 22:49:10 +0200 (CEST)
On Mon, 23 Apr 2012, Salisbury, Mark wrote:
> If you are asked to send 100 bytes, which is translated into 125 encrypted
> bytes, but only 30 bytes (encrypted) are actually sent, how do you know how
> many unencrypted bytes were sent? (how do you know what to return to the
> caller for bytes written?) I don¢t think the caller cares how many
> encrypted bytes were sent.
>
> If you tell the caller 30 bytes were sent, it will call you back at an
> offset 30 bytes into its buffer.
As a user of such a function we don't care how many bytes that were sent, we
care how many bytes from the buffer that was *consumed* and that's how most
network-crypto related send functions tend to work.
I haven't checked how the API works that we're using here in this case so
perhaps there's a need to add a buffering layer in between that would provide
the above mentioned functionality.
-- / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-04-23