From: Aydın Mercan Date: Mon, 1 Dec 2025 10:32:46 +0000 (+0300) Subject: add openssl_wrap X-Git-Tag: v9.21.18~2^2~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4a25e633c2ef5f6b6c68e5146d80f1055328f6f;p=thirdparty%2Fbind9.git add openssl_wrap 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. --- diff --git a/lib/isc/include/isc/ossl_wrap.h b/lib/isc/include/isc/ossl_wrap.h new file mode 100644 index 00000000000..acfe13e762a --- /dev/null +++ b/lib/isc/include/isc/ossl_wrap.h @@ -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 diff --git a/lib/isc/meson.build b/lib/isc/meson.build index 0836490f02f..f2c164a5b71 100644 --- a/lib/isc/meson.build +++ b/lib/isc/meson.build @@ -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 index 00000000000..e610fbe8177 --- /dev/null +++ b/lib/isc/ossl_wrap/meson.build @@ -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 index 00000000000..844583345b1 --- /dev/null +++ b/lib/isc/ossl_wrap/ossl1_1.c @@ -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 +#include + +EMPTY_TRANSLATION_UNIT; diff --git a/lib/isc/ossl_wrap/ossl3.c b/lib/isc/ossl_wrap/ossl3.c new file mode 100644 index 00000000000..844583345b1 --- /dev/null +++ b/lib/isc/ossl_wrap/ossl3.c @@ -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 +#include + +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 index 00000000000..844583345b1 --- /dev/null +++ b/lib/isc/ossl_wrap/ossl_common.c @@ -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 +#include + +EMPTY_TRANSLATION_UNIT;