-
- Downloads
tls_session: fix extra packet send by gnutls
Sometimes the gnutls function gnutls_record_send() reports to have sent more bytes than given. This is happen if we don't flush the internal state of gnutls records or if we don't try to loop with same arguments until we get a positive value or not GNUTLS_E_INTERRUPTED neither GNUTLS_E_AGAIN. When not done correctly the receiption see 2 packets: one of the correct size and another with extra bytes, filled with zero's. This patch fixes this situation by loop on the gnutls send function until we get a return value different of ones given upper. We ensure also to return -1 in case of error in low-level send functions. Change-Id: I209ceba2e25fc7b299c38348cf36801a722af2d7 Tuleap: #798
Please register or sign in to comment