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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user