[gnutls-help] decoding memory buffers in a tls session
Vittorio Giovara
vittorio.giovara at savoirfairelinux.com
Tue May 27 00:31:59 CEST 2014
On 2014-05-24 03:40, Nikos Mavrogiannopoulos wrote:
> On Fri, 2014-05-23 at 19:20 -0400, Vittorio Giovara wrote:
>> As far as I understand the gnutls logic, everything must go through
>> gnutls_record_send and gnutls_record_recv, but there is no way to use
>> the session information to decrypt a raw memory buffer isn't there?
> Hello,
> You could replace the pull function to read from memory, and then
> gnutls_record_recv() would decrypt from memory (and I see that's what
> you actually do).
Hello,
I actually got it working that way: my mistake was that I had thought
that my data_pull() received the same length parameter as
gnutls_record_recv() while instead it was performing two separate reads
(header and packet).
>
>> if (ssock->hack) {
>> data = ssock->hack;
> Shouldn't you do a memcpy there?
Indeed, thanks for spotting it.
Vittorio
> regards,
> Nikos
>
>
More information about the Gnutls-help
mailing list