]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add openssl_wrap
authorAydın Mercan <aydin@isc.org>
Mon, 1 Dec 2025 10:32:46 +0000 (13:32 +0300)
committerAydın Mercan <aydin@isc.org>
Mon, 2 Feb 2026 08:50:14 +0000 (11:50 +0300)
The isc_ossl_wrap API is intended to separate OpenSSL version specific
code that needs to expose the libcrypto internals and keep isc_crypto
clean.

lib/isc/include/isc/ossl_wrap.h [new file with mode: 0644]
lib/isc/meson.build
lib/isc/ossl_wrap/meson.build [new file with mode: 0644]
lib/isc/ossl_wrap/ossl1_1.c [new file with mode: 0644]
lib/isc/ossl_wrap/ossl3.c [new file with mode: 0644]
lib/isc/ossl_wrap/ossl_common.c [new file with mode: 0644]

diff --git a/lib/isc/include/isc/ossl_wrap.h b/lib/isc/include/isc/ossl_wrap.h
new file mode 100644 (file)
index 0000000..acfe13e
--- /dev/null
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+#pragma once
index 0836490f02fe972f45c9967176fe940bc9c65bbb..f2c164a5b717e3822e4e9f0d12c2e27ca8bb2eaf 100644 (file)
@@ -22,6 +22,7 @@ isc_inc_p += include_directories('.')
 
 subdir('crypto')
 subdir('netmgr')
+subdir('ossl_wrap')
 
 isc_srcset.add(
     m_dep,
diff --git a/lib/isc/ossl_wrap/meson.build b/lib/isc/ossl_wrap/meson.build
new file mode 100644 (file)
index 0000000..e610fbe
--- /dev/null
@@ -0,0 +1,16 @@
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# SPDX-License-Identifier: MPL-2.0
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0.  If a copy of the MPL was not distributed with this
+# file, you can obtain one at https://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+isc_srcset.add(
+    when: 'HAVE_OPENSSL_3',
+    if_true: files('ossl3.c', 'ossl_common.c'),
+    if_false: files('ossl1_1.c', 'ossl_common.c'),
+)
diff --git a/lib/isc/ossl_wrap/ossl1_1.c b/lib/isc/ossl_wrap/ossl1_1.c
new file mode 100644 (file)
index 0000000..8445833
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+#include <isc/ossl_wrap.h>
+#include <isc/util.h>
+
+EMPTY_TRANSLATION_UNIT;
diff --git a/lib/isc/ossl_wrap/ossl3.c b/lib/isc/ossl_wrap/ossl3.c
new file mode 100644 (file)
index 0000000..8445833
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+#include <isc/ossl_wrap.h>
+#include <isc/util.h>
+
+EMPTY_TRANSLATION_UNIT;
diff --git a/lib/isc/ossl_wrap/ossl_common.c b/lib/isc/ossl_wrap/ossl_common.c
new file mode 100644 (file)
index 0000000..8445833
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+#include <isc/ossl_wrap.h>
+#include <isc/util.h>
+
+EMPTY_TRANSLATION_UNIT;