Commit Graph
35450 Commits
Author SHA1 Message Date
Matthijs Mekking 9f2b89fa77 Fix keyfromlabel test, missing status update
Fix a missing status=$((status+ret)) in the keyfromlabel system test,
which would ignore the error if ZSK key creation failed.

(cherry picked from commit 7845f51178)
2022-02-04 15:08:41 +01:00
Aram SargsyanandMatthijs Mekking 25cb2704b4 Use unique SoftHSMv2 token label for the "keyfromlabel" test
When there are more than one tokens initialized in SoftHSMv2,
care must be taken to correctly identify them.

Use a SoftHSMv2 token label which will uniquely identify the
token used for this test.

Use the "--token-label" parameter for the `pkcs11-tool` program
to make sure that it finds and uses the correct token.

(cherry picked from commit a449709441)
2022-02-04 15:08:33 +01:00
Matthijs Mekking b3e5e12ddf Fix keyfromlabel echo output
The 'id' variable is either keyfromlabel-ksk or keyfromlabel-zsk and is
set in the 'keygen' and 'keyfromlabel' functions. It should not be used
outside these functions.

(cherry picked from commit 468cf3cdc2)
2022-02-04 15:08:27 +01:00
Matthijs Mekking a9f7e4badb Add test for assertion failure in pk11_numbits
This test was originally in the pkcs11 system test. While this crash
happened in the native pkcs11 of BIND 9, and that code has been
removed in 9.17, there is no need for this test. Nevertheless, it
doesn't hurt having the test case persist.

(cherry picked from commit bfe287f4a4)
2022-02-04 15:08:21 +01:00
Matthijs Mekking 28093e56a9 Add system test for engine_pkcs11
Add a system test for engine_pkcs11 interactions that replaces the
tests that are done in the native PKCS#11 system test.

The native PKCS#11 code was removed in 9.17 but without copying the
pkcs11 system test.

(cherry picked from commit 11a0b41370)
2022-02-04 15:08:15 +01:00
Evan Hunt 6089dc5ba5 Merge branch 'each-missing-relnotes-v9_18' into 'v9_18'
Release notes for [GL #3082] and [GL #3111]

See merge request isc-projects/bind9!5797
2022-02-02 20:04:28 +00:00
Evan Hunt 4c205fb69a Release notes for [GL #3082] and [GL #3111]
(cherry picked from commit d45f0e1d9e)
2022-02-02 12:02:06 -08:00
Petr Špaček 478a10e318 Merge branch '2974-improve-directory-documentation-v9_18' into 'v9_18'
Clarify effect of "directory" configuration option [v9_18]

See merge request isc-projects/bind9!5793
2022-02-02 11:33:46 +00:00
Ondřej SurýandPetr Špaček faafbfa98f Clarify effect of "directory" configuration option
The "directory" configuration options affects the configuration listed
after the directive but not before which may affect ``include``
directive with relative file paths.

(cherry picked from commit 00ba6967b1)
2022-02-02 12:29:30 +01:00
Ondřej Surý cc94730ab9 Merge branch '3125-log-hard-quota-when-not-accepting-the-connection-v9_18' into 'v9_18'
Add log message when hard quota is reached in TCP accept

See merge request isc-projects/bind9!5789
2022-02-01 20:42:11 +00:00
Ondřej Surý b7fb29397a Add CHANGES and release notes for [GL #3125]
(cherry picked from commit 932fc7b826703f8b0f30ed11c496f94a02e6ebbb)
2022-02-01 21:13:07 +01:00
Ondřej Surý 916b301fd4 Add log message when hard quota is reached in TCP accept
When isc_quota_attach_cb() API returns ISC_R_QUOTA (meaning hard quota
was reached) the accept_connection() would return without logging a
message about quota reached.

Change the connection callback to log the quota reached message.

(cherry picked from commit 2ae84702ad)
2022-02-01 21:02:44 +01:00
Petr Špaček f1923ed6cd Merge branch '3120-recent-editions-9-17-22-onwards-of-arm-have-many-empty-grammar-descriptions-v9_18' into 'v9_18'
Fix empty grammar descriptions in the ARM [v9_18]

See merge request isc-projects/bind9!5785
2022-02-01 17:49:28 +00:00
Petr Špaček 724a051820 Add missing parental-agents grammar generation
Formerly parental-agents grammar was an exception and it did not
auto-generate itself from source code. From now on it is generated using
the same mechanism as other grammars.

For consistency with rest of the system, I've also renamed the grammar
file and the link anchors from "parentals" to "parental-agents".

Technically this is fixup for commit
0311705d4b.

Related: !5234
(cherry picked from commit 34a3b35b08)
2022-02-01 18:25:08 +01:00
Mark AndrewsandPetr Špaček 2262bb9538 Regenerate .rst files with grammars after changes to rst generators
$ make -C doc/misc all

(cherry picked from commit e97c35b3bc)
2022-02-01 18:25:08 +01:00
Mark AndrewsandPetr Špaček f51fe1e714 Fix grammar generators to produce renderable include files in rst format
The missing `::` in the .rst files caused grammar section in docs to
render empty.

The `::` was accidentally removed in an unrelated commit
58bd26b6cf which was supposed to update
only copyright headers.

Fixes: #3120
(cherry picked from commit d975e6630f)
2022-02-01 18:25:07 +01:00
Mark AndrewsandPetr Špaček 9eac4401b4 Add missing rst-grammars.pl dependecy to config grammar build
(cherry picked from commit f5c66f311a)
2022-02-01 18:25:03 +01:00
Mark Andrews 9e1aba9cbc Merge branch '3117-9-18-0-nslookup-debugging-output-v9_18' into 'v9_18'
Remove spurious 'debugging = true;'

See merge request isc-projects/bind9!5783
2022-01-31 23:40:29 +00:00
Mark Andrews 4a6078673b Check that no debugging / errors are reported normally
(cherry picked from commit 123b57db36)
2022-02-01 10:22:41 +11:00
Evan HuntandMark Andrews 84baff1d00 make nslookup test shellcheck safe
(cherry picked from commit 6de4dfcc8c)
2022-02-01 10:22:41 +11:00
Mark Andrews ccfa2562a5 Remove spurious 'debugging = true;'
This appears to be left over from the developement phase while
adding reference counting to the lookup structure.

(cherry picked from commit c068c3c771)
2022-02-01 10:22:41 +11:00
Evan Hunt f1977e5017 Merge branch 'each-dlz-pthreads-v9_18' into 'v9_18'
complete removal of !PTHREADS code from DLZ modules

See merge request isc-projects/bind9!5781
2022-01-31 18:41:20 +00:00
Evan Hunt 7923f86bdd complete removal of !PTHREADS code from DLZ modules
DLZ modules no longer support being built without threads,
so the "#if PTHREADS" conditionals were no longer necessary,
and were also causing errors in some of the modules due to
PTHREADS no longer being defined in dlz_pthread.h.

(cherry picked from commit c3a715123b)
2022-01-31 10:37:45 -08:00
Evan Hunt 9b0ffbbe2d Merge branch 'each-fix-contrib-dlz-v9_18' into 'v9_18'
update dlz_minimal.h

See merge request isc-projects/bind9!5777
2022-01-28 00:25:32 +00:00
Evan Hunt 8bd431a251 update dlz_minimal.h
the addition of support for ECS client information in DLZ
modules omitted some necessary changes to build modules
in contrib.

(cherry picked from commit d3fed6f400)
2022-01-27 16:18:34 -08:00
Evan Hunt 9d5e023cc5 Merge branch 'each-dns-clientinfo-v9_18' into 'v9_18'
allow dns_clientinfo to store client ECS data

See merge request isc-projects/bind9!5773
2022-01-27 22:52:23 +00:00
Evan Hunt cee56e3a53 CHANGES for [GL #3082]
(cherry picked from commit e42f7d2722)
2022-01-27 14:51:11 -08:00
Evan Hunt 60f97b6432 test ECS information is passed in dlzexternal
the dlzexternal test driver now includes ECS, if present in the
query, in the TXT record returned for QNAME "source-addr".

(cherry picked from commit 79ddedabf8)
2022-01-27 14:51:11 -08:00
Petr ŠpačekandEvan Hunt 34f6cce2c6 extend DLZ interface and example with ECS support
Apparently we forgot about DLZ when updating DNS_CLIENTINFO_VERSION
constant for ECS, which is at value "3" since ECS was introduced.

The code in example drivers and tests now hardcodes version numbers
2 (without ECS) and 3 (with ECS) depending on what a given code path
requires.

(cherry picked from commit f81debe1c8)
2022-01-27 14:51:11 -08:00
Evan Hunt 317ef804c0 allow dns_clientinfo to store client ECS data
this brings DNS_CLIENTINFO_VERSION into line with the subscription
branch so that fixes applied to clientinfo processing can also be
applied to the main branch without diverging.

(cherry picked from commit 737e658602)
2022-01-27 14:51:11 -08:00
Ondřej Surý f9926228e1 Merge branch '3108-cacheline-detection-propagate-v9_18' into 'v9_18'
Use detected cache line size

See merge request isc-projects/bind9!5771
2022-01-27 12:37:14 +00:00
Ondřej Surý 6c578f232e Add CHANGES note for [GL #3108]
(cherry picked from commit f386fab2e2)
2022-01-27 13:07:31 +01:00
Petr MenšíkandOndřej Surý b465b29eaf Use detected cache line size
IBM power architecture has L1 cache line size equal to 128.  Take
advantage of that on that architecture, do not force more common value
of 64.  When it is possible to detect higher value, use that value
instead.  Keep the default to be 64.

(cherry picked from commit f00f521e9c)
2022-01-27 13:07:31 +01:00
Ondřej Surý 5e25081edc Merge branch '3115-qname-wait-recurse-typo-v9_18' into 'v9_18'
Fix typo in qname-wait-recurse

See merge request isc-projects/bind9!5769
2022-01-27 11:58:08 +00:00
Ondřej Surý 6b681e7019 Fix typo in qname-wait-recurse
In the RPZ documentation, there's a mistake where it states that the
default behavior will be disabled by setting `qname-wait-recurse yes;`
while in fact it's opposite `qname-wait-recurse no;`.

This affects only the RST documentation.

(cherry picked from commit 1e711dcccb)
2022-01-27 12:55:40 +01:00
Matthijs Mekking dbf55d5ebd Merge branch 'matthijs-keyfromlabel-system-test-9_18' into 'v9_18'
keyfromlabel system test (9.18)

See merge request isc-projects/bind9!5767
2022-01-27 11:24:50 +00:00
Matthijs Mekking 79d14cacd3 Update pkcs11 documentation on openssl_conf
The user should make sure there are no other 'openssl_conf = ...' lines
in the file.

(cherry picked from commit a90f4c4ffa)
2022-01-27 12:23:22 +01:00
Matthijs Mekking 4895b10884 Create keys with pkcs11-tool --id
The keyfromlabel system ECDSA tests sometimes fail. When this happens
the ZSK and KSK key id values differ by 1, which is an indication that
the same key is used for both DNSKEY records.

When the private key is retrieved with 'ENGINE_load_private_key()', the
public key is already set. But sometimes that key differs from the key
which was retrieved with 'ENGINE_load_public_key()'.

The libp11 source code uses id to find the key and without IDs all the
keys are "equal", so it is returning the first key in the array of the
enumerated keys instead of the matching key. In our test we didn't use
'--id', just '--label'. With this change, the system test should no
longer fail intermittently.

Note this is only an issue for ECDSA keys, not RSA keys.

(cherry picked from commit 0af8bbd49b)
2022-01-27 12:23:22 +01:00
Matthijs Mekking c3f35147a3 Suppressing memory leaks procuded by LeakSanitizer
These memory leaks are a known issue in libp11: From Timo Teras:

The relevant code is:

  https://github.com/OpenSC/libp11/blob/master/src/eng_front.c#L114-L123

The authors of libp11 did not get the locking right and decided
that having intentional memory leaks is better than risking a deadlock.

The leak logs indicate that it is the cached structures that should
have been freed.

These are not a run-time leaks, so suppressing these leaks is probably
okay.

(cherry picked from commit 8a4f098dee)
2022-01-27 12:23:22 +01:00
Matthijs Mekking 9926ea647f Add system test for dnssec-keyfromlabel
Add missing system test for dnssec-keyfromlabel. Test for various
algorithms that we can generate key files from a key that is stored in a
HSM, and that those keys can be used for signing with dnssec-signzone.

(cherry picked from commit eba66665a5)
2022-01-27 12:23:12 +01:00
Matthijs Mekking 1329e89927 Update .gitlab-ci.yml with openssl setup
GitLab CI needs to know about some environment variables that will
tell where OpenSSL and SoftHSM2 is installed. This is done in the
image, making the prepare-softhsm2.sh script obsolete.

The SoftHSM2 module location is system specific.

(cherry picked from commit 221e1bc2a3)
2022-01-27 12:21:58 +01:00
Matthijs Mekking a373b821ee Remove prepare-softhsm2.sh from runtime test
This script is obsoleted because SoftHSM2 is now installed in the
image.

(cherry picked from commit 0725fcad38)
2022-01-27 12:21:58 +01:00
Matthijs Mekking 90480c0d54 Add CHANGES for keyfromlabel test
(cherry picked from commit ad01bca9fd)
2022-01-27 12:21:58 +01:00
Michal Nowak 612341a1da Merge branch 'mnowak/drop-some-system-test-scrips-v9_18' into 'v9_18'
[v9_18] Remove leftover test code for Windows

See merge request isc-projects/bind9!5766
2022-01-27 10:49:21 +00:00
Evan HuntandMichal Nowak 018f8be52a Remove leftover test code for Windows
- Removed all code that only runs under CYGWIN, and made all
  code that doesn't run under CYGWIN non-optional.
- Removed the $TP variable which was used to add optional
  trailing dots to filenames; they're no longer optional.
- Removed references to pssuspend and dos2unix.
- No need to use environment variables for diff and kill.
- Removed uses of "tr -d '\r'"; this was a workaround for
  a cygwin regex bug that is no longer needed.

(cherry picked from commit 1d706f328c)
2022-01-27 10:35:54 +01:00
Michał Kępień c2c7b36f5e Merge branch 'ondrej/use-utc-for-reproducible-builds-v9_18' into 'v9_18'
[v9_18] Use UTC datetime for reproducible builds

See merge request isc-projects/bind9!5765
2022-01-27 05:56:35 +00:00
Ondřej SurýandMichał Kępień 9bfbff4a3c Use UTC datetime for reproducible builds
For reproducible builds, we use last modification time of the CHANGES
file.  This works pretty well, unless the builds are made in different
timezones.

Use UTC option to date command to make the builds reproducible.

(cherry picked from commit 8c4d5d5623)
2022-01-27 06:53:15 +01:00
Arаm Sаrgsyаn ab061cbc69 Merge branch '3087-tls-ephemeral-certificate-set-not-before-in-past-v9_18' into 'v9_18'
[v9_18] Set the ephemeral certificate's "not before" a short time in the past

See merge request isc-projects/bind9!5762
2022-01-26 18:29:16 +00:00
Aram Sargsyan 3d835107af Set the ephemeral certificate's "not before" a short time in the past
TLS clients can have their clock a short time in the past which will
result in not being able to validate the certificate.

Setting the "not before" property 5 minutes in the past will
accommodate with some possible clock skew across systems.

(cherry picked from commit 81d3584116)
2022-01-26 17:28:37 +00:00
Michał Kępień e82c8c6105 Merge branch 'michal/misc-test-framework-fixes-v9_18' into 'v9_18'
[v9_18] Miscellaneous test framework fixes

See merge request isc-projects/bind9!5763
2022-01-26 14:40:46 +00:00