]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolve: rename resolved-dnstls-openssl.c -> resolved-dnstls.c
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Apr 2025 20:29:16 +0000 (05:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 1 Apr 2025 20:30:28 +0000 (05:30 +0900)
and merge resolved-dnstls.h and resolved-dnstls-openssl.h.

src/resolve/meson.build
src/resolve/resolved-dnstls-openssl.h [deleted file]
src/resolve/resolved-dnstls.c [moved from src/resolve/resolved-dnstls-openssl.c with 100% similarity]
src/resolve/resolved-dnstls.h

index a64cfee2b7eaccc79dc9074643281e22a1006b2b..305c41af834fa1be57e7ba28c593617d4dcdda8c 100644 (file)
@@ -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
diff --git a/src/resolve/resolved-dnstls-openssl.h b/src/resolve/resolved-dnstls-openssl.h
deleted file mode 100644 (file)
index e94f540..0000000
+++ /dev/null
@@ -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;
-};
index 62b471ca2b7240b59b886c2219e89caae47850ca..3d06a82196b2c990c912569dd2d920d3692fd25b 100644 (file)
@@ -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);