resolve: rename resolved-dnstls-openssl.c -> resolved-dnstls.c
and merge resolved-dnstls.h and resolved-dnstls-openssl.h.
This commit is contained in:
@@ -103,7 +103,7 @@ systemd_resolved_sources += custom_target(
|
||||
systemd_resolved_dependencies = [threads, libm] + [lib_openssl_or_gcrypt]
|
||||
if conf.get('ENABLE_DNS_OVER_TLS') == 1
|
||||
systemd_resolved_sources += files(
|
||||
'resolved-dnstls-openssl.c',
|
||||
'resolved-dnstls.c',
|
||||
)
|
||||
systemd_resolved_dependencies += libopenssl
|
||||
endif
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
#pragma once
|
||||
|
||||
#if !ENABLE_DNS_OVER_TLS || !HAVE_OPENSSL
|
||||
#error This source file requires DNS-over-TLS to be enabled and OpenSSL to be available.
|
||||
#endif
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct DnsTlsManagerData {
|
||||
SSL_CTX *ctx;
|
||||
};
|
||||
|
||||
struct DnsTlsServerData {
|
||||
SSL_SESSION *session;
|
||||
};
|
||||
|
||||
struct DnsTlsStreamData {
|
||||
int handshake;
|
||||
bool shutdown;
|
||||
SSL *ssl;
|
||||
BUF_MEM *write_buffer;
|
||||
size_t buffer_offset;
|
||||
};
|
||||
@@ -3,18 +3,35 @@
|
||||
|
||||
#if ENABLE_DNS_OVER_TLS
|
||||
|
||||
#if !HAVE_OPENSSL
|
||||
#error This source file requires OpenSSL to be available.
|
||||
#endif
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include "resolved-dnstls-openssl.h"
|
||||
|
||||
typedef struct DnsServer DnsServer;
|
||||
typedef struct DnsStream DnsStream;
|
||||
typedef struct DnsTlsManagerData DnsTlsManagerData;
|
||||
typedef struct DnsTlsServerData DnsTlsServerData;
|
||||
typedef struct DnsTlsStreamData DnsTlsStreamData;
|
||||
typedef struct Manager Manager;
|
||||
|
||||
typedef struct DnsTlsManagerData {
|
||||
SSL_CTX *ctx;
|
||||
} DnsTlsManagerData;
|
||||
|
||||
typedef struct DnsTlsServerData {
|
||||
SSL_SESSION *session;
|
||||
} DnsTlsServerData;
|
||||
|
||||
typedef struct DnsTlsStreamData {
|
||||
int handshake;
|
||||
bool shutdown;
|
||||
SSL *ssl;
|
||||
BUF_MEM *write_buffer;
|
||||
size_t buffer_offset;
|
||||
} DnsTlsStreamData;
|
||||
|
||||
#define DNSTLS_STREAM_CLOSED 1
|
||||
|
||||
int dnstls_stream_connect_tls(DnsStream *stream, DnsServer *server);
|
||||
|
||||
Reference in New Issue
Block a user