1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

Revert "resolved: Fix incorrect use of OpenSSL BUF_MEM"

This reverts commit 18bddeaaf2.

Revert this because it does not take the OpenSSL internal read pointer
into considoration. Resulting in padding in packetdata and therefore
broken SSL connections.
This commit is contained in:
Iwan Timmer 2019-06-15 21:56:45 +02:00
parent 4b381a9ef6
commit 53d64ebb30

View File

@ -6,7 +6,6 @@
#include <openssl/bio.h>
#include <openssl/err.h>
#include <string.h>
#include "io-util.h"
#include "resolved-dns-stream.h"
@ -35,11 +34,9 @@ static int dnstls_flush_write_buffer(DnsStream *stream) {
return ss;
} else {
stream->dnstls_data.write_buffer->length -= ss;
stream->dnstls_data.write_buffer->data += ss;
if (stream->dnstls_data.write_buffer->length > 0) {
memmove(stream->dnstls_data.write_buffer->data,
stream->dnstls_data.write_buffer->data + ss,
stream->dnstls_data.write_buffer->length);
stream->dnstls_events |= EPOLLOUT;
return -EAGAIN;
}