2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 13:38:26 +00:00

42258 Commits

Author SHA1 Message Date
Michal Nowak
bdf8859e2d All footnotes need to have unique name and be referenced
With Sphinx 8.1.0, footnotes can't stand on their own and have to be
referenced from somewhere, otherwise build fails, e.g.:

    doc/dnssec-guide/signing.rst:1470: WARNING: Footnote [#] is not referenced. [ref.footnote]
2024-10-21 07:22:36 +00:00
Evan Hunt
923b915797 fix: nil: corrected code style errors
- add missing brackets around one-line statements
- add paretheses around return values

Merge branch 'each-style-corrections' into 'main'

See merge request isc-projects/bind9!9664
2024-10-18 19:31:40 +00:00
Evan Hunt
5ea1f6390d corrected code style errors
- add missing brackets around one-line statements
- add paretheses around return values
2024-10-18 19:31:27 +00:00
Mark Andrews
8467449407 fix: usr: Restore values when dig prints command line
Options of the form `[+-]option=<value>` failed to display the value on the printed command line. This has been fixed.

Closes #4993

Merge branch '4993-dig-restore-command-line-values' into 'main'

See merge request isc-projects/bind9!9653
2024-10-18 02:09:38 +00:00
Mark Andrews
df5b4ba894 Correctly get final token 2024-10-18 01:24:32 +00:00
Mark Andrews
609d96aa12 Restore seperator values
strtok_r is destructive.  Restore the seperators so that the command
line can be properly displayed.
2024-10-18 01:24:32 +00:00
Aydın Mercan
54c5a8e962 fix: import missing definitions for fips builds
FIPS build of libisc failed from some missing definitions.

Closes #4994

Merge branch '4994-crypto-c-174-7-error-implicit-declaration-of-function-isc_fips_mode' into 'main'

See merge request isc-projects/bind9!9655
2024-10-17 14:54:52 +00:00
Aydın Mercan
0b0f05215c
include missing definitions for fips builds 2024-10-17 15:28:31 +03:00
Michal Nowak
84316dcf47 chg: doc: Read the Docs should always source requirements.txt from "main"
HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.

Merge branch 'mnowak/rtd-always-resource-requirements-txt-from-main' into 'main'

See merge request isc-projects/bind9!9630
2024-10-17 10:47:11 +00:00
Michal Nowak
8fb6115492
Read the Docs should always source requirements.txt from "main"
HTTP URI of doc/arm/requirements.txt on the "main" branch is the source
of PyPI packages in CI base image. To make it consistent in all
maintained CI branches on RTD, use the HTTP URI as well.

This change is non-material on the "main" branch, but ensures the right
packages on stable branches where for RTD we currently leverage outdated
packages because we failed to update doc/arm/requirements.txt there.
2024-10-17 12:11:08 +02:00
Michal Nowak
fc324043c6 chg: doc: Update Sphinx, docutils, and sphinx_rtd_theme packages
Merge branch 'mnowak/doc-tools-october-2024-updates' into 'main'

See merge request isc-projects/bind9!9652
2024-10-17 10:08:55 +00:00
Michal Nowak
54410e034f
Add RFCs referenced by footnotes
With Sphinx 8.1.0, footnotes can't stand on their own and have
referenced from somewhere:

    /builds/isc-projects/bind9/doc/arm/general.rst:439: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:441: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:445: WARNING: Footnote [#] is not referenced. [ref.footnote]
    /builds/isc-projects/bind9/doc/arm/general.rst:457: WARNING: Footnote [#] is not referenced. [ref.footnote]
2024-10-17 12:07:55 +02:00
Michal Nowak
755dd44ec5
Update Sphinx, docutils, and sphinx_rtd_theme packages 2024-10-17 11:43:56 +02:00
Nicki Křížek
2e277cc70e chg: test: Disable too-many/too-few pylint checks
Merge branch 'nicki/pylint-disable-too-few-too-many-checks' into 'main'

See merge request isc-projects/bind9!9626
2024-10-17 09:11:26 +00:00
Nicki Křížek
7639c58c48 Disable too-many/too-few pylint checks
Enforcing pylint standards and default for our test code seems
counter-productive. Since most of the newly added code are tests or is
test-related, encountering these checks rarely make us refactor the code
in other ways and we just disable these checks individually. Code that
is too complex or convoluted will be pointed out in reviews anyways.
2024-10-17 11:01:44 +02:00
Mark Andrews
d7fab54393 fix: usr: 'Recursive-clients 0;' triggers an assertion
BIND 9.20.0 broke `recursive-clients 0;`.  This has now been fixed.

Closes #4987

Merge branch '4987-fix-recursive-clients-0' into 'main'

See merge request isc-projects/bind9!9621
2024-10-17 06:43:25 +00:00
Mark Andrews
677abded6b Add regression test for [GL #4987] 2024-10-17 11:04:32 +11:00
Mark Andrews
840eaa628d Fix recursive-clients 0
Setting recursive-clients 0 triggered an assertion in isc_quota_soft.
This has now been fixed.
2024-10-17 11:04:26 +11:00
Michal Nowak
b98f82b94f Merge tag 'v9.21.2' 2024-10-16 17:49:36 +02:00
Matthijs Mekking
6dca5a0ced chg: test: Rewrite ksr system test to pytest
Merge branch 'matthijs-pytest-rewrite-ksr' into 'main'

See merge request isc-projects/bind9!9445
2024-10-16 15:45:18 +00:00
Matthijs Mekking
b8b3df0676 Retry dnssec-verify in kasp test code
It is possible that the zone is not yet fully signed because it is
signed in batches. Retry the AXFR and verify command a couple of times.
2024-10-16 17:16:02 +02:00
Nicki Křížek
3c6124a093 Address pylint issues 2024-10-16 17:16:02 +02:00
Nicki Křížek
b7207fa3e7 Use difflib rather than diff cmd 2024-10-16 17:16:02 +02:00
Nicki Křížek
c9ecd2a618 Move algorithm defaults to check_keys() 2024-10-16 17:16:02 +02:00
Nicki Křížek
55ec9f94bc Use f-strings 2024-10-16 17:16:02 +02:00
Nicki Křížek
732a959d9a Simplify command invocation 2024-10-16 17:16:02 +02:00
Nicki Křížek
b5633462bf Remove unused isctest/kasp code 2024-10-16 17:16:02 +02:00
Nicki Křížek
67957d1f54 Rename kasp function to check_*
If a function is expected to assert / raise on failure (rather than
return boolean), its name should start with "check_".
2024-10-16 17:16:02 +02:00
Nicki Křížek
2b0a8fcfb5 Use convenience wrappers for kasp key operations 2024-10-16 17:16:02 +02:00
Matthijs Mekking
a15bf6704b Convert ksr system test to pytest
Move all test cases from tests.sh to tests_ksr.py. The only test that
is not moved is the check that key id's match expected keys. The
shell-based system test checks two earlier set environment variables
against each other that has become redundant in the pytest variant,
because we now check the signed key response against a list of keys
and for each key we take into account the timing metadata. So we
already ensure that each published key is in the correct key bundle.
2024-10-16 17:16:02 +02:00
Matthijs Mekking
a3829990fd Introduce pytest kasp library
Write initial pytest kasp library. This contains everything that is
required for testing Offline KSK functionality with pytest.

This includes:
- addtime: adding a value to a timing metadata
- get_timing_metdata: retrieve timing metadata from keyfile
- get_metadata/get_keystate: retrieve metadata from statefile
- get_keytag: retrieve keytag from base keyfile string
- get_keyrole: get key role from statefile
- dnskey_equals: compare DNSKEY record from file against a string
- cds_equals: compare CDS derived from file against a string
- zone_is_signed: wait until a zone is completely signed
- dnssec_verify: verify a DNSSEC signed zone with dnssec-verify
- check_dnssecstatus: check rndc dnssec -status output
- check_signatures: check that signatures for a given RRset are correct
- check_dnskeys: check that the published DNSKEY RRset is correct
- check_cds: check that the published CDS RRset is correct
- check_apex: check SOA, DNSKEY, CDNSKEY, and CDS RRset
- check_subdomain: check an RRset below the apex
2024-10-16 17:16:02 +02:00
Matthijs Mekking
ea1fc5c47b Change dnssec-ksr key sorting
Sort keys on algorithm, then keytag. This is more convenient for
testing.
2024-10-16 17:16:02 +02:00
Aydın Mercan
94e5061151 chg: dev: unify explicit fetching and libcrypto handling
Unify libcrypto initialization and explicit digest fetching in a single place.

It will remove the remaining implicit fetching and deduplicate explicit
fetching inside the codebase. Initialization has been moved in to ensure
OpenSSL cleanup is done only after fetched contextes are destroyed.

Merge branch 'aydin/libdns-explicit-fetch' into 'main'

See merge request isc-projects/bind9!9288
2024-10-16 12:53:31 +00:00
Aydın Mercan
05798b31ff
unify libcrypto and evp_md handling
Unify libcrypto initialization and explicit digest fetching in a single
place and move relevant code to the isc__crypto namespace instead of
isc__tls.

It will remove the remaining implicit fetching and deduplicate explicit
fetching inside the codebase.
2024-10-16 14:03:14 +03:00
Mark Andrews
a1fed2d8e7 rem: dev: Remove unused <openssl/hmac.h> headers from OpenSSL shims
The <openssl/hmac.h> header was unused and including the
header might cause build failure when OpenSSL doesn't have
Engines support enabled.

See https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine

Removes unused hmac includes after Remove OpenSSL Engine support
(commit ef7aba70) removed engine support.

Merge branch 'main-openssl-engine' into 'main'

See merge request isc-projects/bind9!9228
2024-10-16 04:54:09 +00:00
Petr Menšík
9e55ffaf89 Remove unused <openssl/hmac.h> headers from OpenSSL shims
The <openssl/hmac.h> header was unused and including the
header might cause build failure when OpenSSL doesn't have
Engines support enabled.

See https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine

Removes unused hmac includes after Remove OpenSSL Engine support
(commit ef7aba70726cff9afaaa8c7054098f84087ccf84) removed engine
support.
2024-10-16 04:19:16 +00:00
Michal Nowak
81bcc19265 chg: test: Remove unused sbytes, stime, n, response, and rtime variables
Merge branch 'mnowak/drop-unused-variables' into 'main'

See merge request isc-projects/bind9!9617
2024-10-15 17:53:46 +00:00
Michal Nowak
c0246ecef6 Add vulture 2024-10-15 17:38:03 +00:00
Michal Nowak
4857da271d Remove unused sbytes, stime, n, response, and rtime variables 2024-10-15 17:38:03 +00:00
Michal Nowak
a8383e5785 chg: test: Rewrite tools system test to pytest
Merge branch 'mnowak/pytest_rewrite_tools' into 'main'

See merge request isc-projects/bind9!9208
2024-10-15 17:19:09 +00:00
Michal Nowak
3f8e59330d
Rewrite tools system test to pytest 2024-10-15 18:35:47 +02:00
Nicki Křížek
33380d7a50 chg: ci: Allow re-try of unit tests on FreeBSD 14
The unit test doh_test tends do fail quite often due to exceeding run
time limit in the unit:clang:freebsd14:amd64 job. Use a retry on gitlab
level to alleviate the issue until a better fix is available.

Related #4924

Merge branch '4924-retry-doh_test-freebsd14' into 'main'

See merge request isc-projects/bind9!9578
2024-10-15 11:14:02 +00:00
Nicki Křížek
1636864ddb Allow re-try of unit tests on FreeBSD 14
The unit test doh_test tends do fail quite often due to exceeding run
time limit in the unit:clang:freebsd14:amd64 job. Use a retry on gitlab
level to alleviate the issue until a better fix is available.
2024-10-15 12:39:18 +02:00
Nicki Křížek
66c52a92c5 chg: test: Support dnspython 2.7.0
Closes #4988

Merge branch '4988-dnspython-2.7.0-support' into 'main'

See merge request isc-projects/bind9!9634
2024-10-15 10:27:08 +00:00
Nicki Křížek
0d90b13646 Support dnspython 2.7.0
CookieOption with new .server/.client attributes (rather than .data) was
added to dnspython. Adjust the code to use the new attributes if
available and fall back to the old code for dnspython<2.7.0
compatibility.
2024-10-15 10:03:25 +02:00
Mark Andrews
a33528fe99 fix: usr: Fix NSEC3 closest encloser lookup for names with empty non-terminals
The performance improvement for finding the NSEC3 closest encloser when generating authoritative responses could cause servers to return incorrect NSEC3 records in some cases. This has been fixed.

Closes #4950

Merge branch '4950-bind-logs-expected-covering-nsec3-got-an-exact-match' into 'main'

See merge request isc-projects/bind9!9610
2024-10-14 23:54:27 +00:00
Mark Andrews
b457f64d4a Test that the correct NSEC3 closest encloser is returned 2024-10-14 23:19:34 +00:00
Mark Andrews
67f31c5046 Use a binary search to find the NSEC3 closest encloser
maxlabels is the suffix length that corresponds to the latest
NXDOMAIN response.  minlabels is the suffix length that corresponds
to longest found existing name.
2024-10-14 23:19:34 +00:00
Evan Hunt
87ec2ce498 fix: usr: Report client transport in 'rndc recursing'
When `rndc recursing` is used to dump the list of recursing clients, it now indicates whether a query was sent via UDP, TCP, TLS, or HTTP.

Closes #4971

Merge branch '4971-recursing-show-client-transport' into 'main'

See merge request isc-projects/bind9!9590
2024-10-14 21:16:27 +00:00
Evan Hunt
3ad82a4721 add a unit test for dns_transport_totext()
confirm that the text returned by the dns_transport_totext()
function matches the transport type when it was created.
2024-10-14 12:59:52 -07:00