summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Knot.files2
-rw-r--r--src/libdnssec/Makefile.inc3
-rw-r--r--src/libdnssec/sample_keys.h (renamed from tests/libdnssec/sample_keys.h)0
-rw-r--r--src/utils/keymgr/keystore.c2
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/libdnssec/test_key.c4
-rw-r--r--tests/libdnssec/test_key_ds.c4
-rw-r--r--tests/libdnssec/test_keystore_pkcs11.c5
-rw-r--r--tests/libdnssec/test_sign.c6
9 files changed, 14 insertions, 13 deletions
diff --git a/Knot.files b/Knot.files
index 6ab3aec2c..22b8d65e1 100644
--- a/Knot.files
+++ b/Knot.files
@@ -439,6 +439,7 @@ src/libdnssec/pem.c
src/libdnssec/pem.h
src/libdnssec/random.c
src/libdnssec/random.h
+src/libdnssec/sample_keys.h
src/libdnssec/shared/bignum.c
src/libdnssec/shared/bignum.h
src/libdnssec/shared/binary_wire.h
@@ -685,7 +686,6 @@ tests/knot/test_zone_events.c
tests/knot/test_zone_serial.c
tests/knot/test_zone_timers.c
tests/knot/test_zonedb.c
-tests/libdnssec/sample_keys.h
tests/libdnssec/test_binary.c
tests/libdnssec/test_crypto.c
tests/libdnssec/test_key.c
diff --git a/src/libdnssec/Makefile.inc b/src/libdnssec/Makefile.inc
index 981d84102..b12abb802 100644
--- a/src/libdnssec/Makefile.inc
+++ b/src/libdnssec/Makefile.inc
@@ -8,6 +8,9 @@ if ENABLE_PKCS11
libdnssec_la_LIBADD += $(pthread_LIBS)
endif
+EXTRA_DIST +=
+ libdnssec/sample_keys.h
+
include_libdnssecdir = $(includedir)/libdnssec
include_libdnssec_HEADERS = \
libdnssec/binary.h \
diff --git a/tests/libdnssec/sample_keys.h b/src/libdnssec/sample_keys.h
index 5b6155ed4..5b6155ed4 100644
--- a/tests/libdnssec/sample_keys.h
+++ b/src/libdnssec/sample_keys.h
diff --git a/src/utils/keymgr/keystore.c b/src/utils/keymgr/keystore.c
index 9d33bf65b..5d51914c2 100644
--- a/src/utils/keymgr/keystore.c
+++ b/src/utils/keymgr/keystore.c
@@ -24,13 +24,13 @@
#include "libdnssec/key/algorithm.h"
#include "libdnssec/key/privkey.h"
#include "libdnssec/random.h"
+#include "libdnssec/sample_keys.h"
#include "libdnssec/sign.h"
#include "libknot/errcode.h"
#include "knot/conf/conf.h"
#include "knot/dnssec/kasp/kasp_zone.h"
#include "knot/server/dthreads.h"
#include "utils/common/msg.h"
-#include "../tests/libdnssec/sample_keys.h"
#define DFLT_ID "-"
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c42d235b7..bbcf8b8d5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,7 +28,6 @@ LDADD += \
EXTRA_DIST = \
tap/libtap.sh \
- libdnssec/sample_keys.h \
knot/semantic_check_data \
knot/test_semantic_check.in \
libzscanner/data \
diff --git a/tests/libdnssec/test_key.c b/tests/libdnssec/test_key.c
index 7f421cae2..effbe1a7d 100644
--- a/tests/libdnssec/test_key.c
+++ b/tests/libdnssec/test_key.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2024 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
#include "error.h"
#include "key.h"
-#include "sample_keys.h"
+#include "libdnssec/sample_keys.h"
#define check_attr_scalar(key, type, name, def_val, set_val) { \
type value = dnssec_key_get_##name(key); \
diff --git a/tests/libdnssec/test_key_ds.c b/tests/libdnssec/test_key_ds.c
index 07dca6b26..e0762433c 100644
--- a/tests/libdnssec/test_key_ds.c
+++ b/tests/libdnssec/test_key_ds.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2024 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
#include "libdnssec/crypto.h"
#include "libdnssec/error.h"
#include "libdnssec/key.h"
-#include "sample_keys.h"
+#include "libdnssec/sample_keys.h"
static void test_key(const char *name, const struct key_parameters *params)
{
diff --git a/tests/libdnssec/test_keystore_pkcs11.c b/tests/libdnssec/test_keystore_pkcs11.c
index 9828fce1b..5227d55b2 100644
--- a/tests/libdnssec/test_keystore_pkcs11.c
+++ b/tests/libdnssec/test_keystore_pkcs11.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2024 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,10 +28,9 @@
#include "libdnssec/crypto.h"
#include "libdnssec/error.h"
#include "libdnssec/keystore.h"
+#include "libdnssec/sample_keys.h"
#include "libdnssec/sign.h"
-#include "sample_keys.h"
-
#define ENV_SOFTHSM_DSO "KNOT_SOFTHSM2_DSO"
#define ENV_SOFTHSM_UTIL "KNOT_SOFTHSM2_UTIL"
diff --git a/tests/libdnssec/test_sign.c b/tests/libdnssec/test_sign.c
index eb1754f2e..933206fb9 100644
--- a/tests/libdnssec/test_sign.c
+++ b/tests/libdnssec/test_sign.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2023 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2024 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,14 +17,14 @@
#include <string.h>
#include <tap/basic.h>
-#include "sample_keys.h"
-
#include "binary.h"
#include "crypto.h"
#include "error.h"
#include "key.h"
#include "sign.h"
+#include "libdnssec/sample_keys.h"
+
static const dnssec_binary_t input_data = {
.size = 25,
.data = (uint8_t *)"Very good, young padawan."