Mark Andrews
b6e1650455
Style fix
2023-09-01 12:01:20 +10:00
Mark Andrews
299f519b09
Check that buf is large enough
2023-09-01 12:01:20 +10:00
Mark Andrews
9e2288208d
Take ownership of pointer before freeing
2023-09-01 12:01:20 +10:00
Mark Andrews
4c4ecbc83c
Address potential memory leak in dst__openssl_fromlabel
2023-09-01 12:01:20 +10:00
Mark Andrews
b442ae8d3e
Add missing "Design by Contract" REQUIREs
2023-09-01 12:01:20 +10:00
Mark Andrews
936b73cb57
Free evp_md_ctx and pkey at exit
2023-09-01 12:01:20 +10:00
Mark Andrews
eaedba6621
Clear OpenSSL error stack when exiting
2023-09-01 12:01:20 +10:00
Mark Andrews
4f790b6c58
Clear OpenSSL errors on TSL error paths
2023-09-01 12:01:20 +10:00
Mark Andrews
96db614d69
Clear OpenSSL errors on context creation failures
2023-09-01 12:01:20 +10:00
Mark Andrews
247422c69f
Clear OpenSSL errors on SHA failures
2023-09-01 12:01:20 +10:00
Mark Andrews
279973363e
Clear OpenSSL errors on OSSL_PROVIDER_load failures
2023-09-01 12:01:20 +10:00
Mark Andrews
2ba62aebce
Clear OpenSSL errors on engine errors
2023-09-01 12:01:19 +10:00
Mark Andrews
4ea926934a
Clear OpenSSL errors on EVP failures
2023-09-01 12:01:19 +10:00
Mark Andrews
6df53cdb87
Clear OpenSSL errors on EVP_PKEY_new failures
2023-09-01 12:01:19 +10:00
Mark Andrews
86b04368b0
Clear OpenSSL errors on EC_KEY_get0_private_key failures
2023-09-01 12:01:19 +10:00
Mark Andrews
abd8c03592
Clear OpenSSL errors on EVP_PKEY_get0_EC_KEY failures
2023-09-01 12:01:19 +10:00
Mark Andrews
d8a9adc821
Clear OpenSSL errors on EVP_PKEY_get_bn_param failures
2023-09-01 12:01:19 +10:00
Mark Andrews
8529be30bb
Clear OpenSSL errors on EVP_MD_CTX_create failures
2023-09-01 12:01:19 +10:00
Mark Andrews
eafcd41120
Clear OpenSSL errors on ECDSA_SIG_new failures
2023-09-01 12:01:19 +10:00
Mark Andrews
5e09d959b0
Clear OpenSSL errors on d2i_ASN1_OBJECT failures
...
When d2i_ASN1_OBJECT() fails an error is pushed onto the thread's
error stack. This is now cleared by calling ERR_clear_error().
2023-09-01 12:01:19 +10:00
Ondřej Surý
4e1630eeba
Merge branch 'ondrej-isc_mem_cget' into 'main'
...
Checked array allocation arithmetic with isc_mem_get and friends
See merge request isc-projects/bind9!8237
2023-08-31 20:18:26 +00:00
Ondřej Surý
166cb53741
Add CHANGES note for [GL !8237 ]
2023-08-31 22:08:35 +02:00
Ondřej Surý
d9048b3db1
Remove ISC_MEM_ZERO and isc_mem_*x() API
...
Use the new isc_mem_c*() calloc-like API for allocations that are
zeroed.
In turn, this also fixes couple of incorrect usage of the ISC_MEM_ZERO
for structures that need to be zeroed explicitly.
There are few places where isc_mem_cput() is used on structures with a
flexible member (or similar).
2023-08-31 22:08:35 +02:00
Ondřej Surý
8ac679a980
Remove ISC_MEM_ALIGN() memory flag
...
The ISC_MEM_ALIGN() was not used anywhere (except mem.c itself), so just
remove the unused flag.
2023-08-31 22:08:35 +02:00
Ondřej Surý
55c29b8d83
Do extra manual isc_mem_cget() conversions
...
Some of the cases weren't caught by the coccinelle and there were some
places where cget+memmove() could get converted to simple creget().
2023-08-31 22:08:35 +02:00
Ondřej Surý
89fcb6f897
Apply the isc_mem_cget semantic patch
2023-08-31 22:08:35 +02:00
Tony Finch and Ondřej Surý
a742fde51a
A semantic patch to refactor isc_mem_cget and friends
...
The aim is to match unsafe patterns of allocation size arithmetic
and turn them into safe calls to the new `isc_mem_cget()`,
`isc_mem_creget()`, and `isc_mem_cput()`.
2023-08-31 22:08:35 +02:00
Ondřej Surý
6272482113
Checked array allocation arithmetic with isc_mem_get and friends
...
Add new isc_mem_cget(), isc_mem_creget(), and isc_mem_cput() macros to
complement the isc_mem_callocate() (which works like calloc()).
The overflow checks are implemented as macros in the <isc/mem.h>, so
that the compiler can see that the element size is constant: it should
always be `sizeof(something)`.
2023-08-31 22:08:35 +02:00
Ondřej Surý
8ff4895628
Merge branch 'each-cleanup-function-names' into 'main'
...
remove extra function names
See merge request isc-projects/bind9!8204
2023-08-31 20:08:13 +00:00
Evan Hunt
8bda38e7d4
remove dns_name_totext2() and dns_name_toprincipal()
...
we can pass option flags to dns_name_totext() to get the same
results, and eliminate the extra function names.
2023-08-31 12:53:32 -07:00
Evan Hunt
62d70966f2
remove dns_name_towire2()
...
we don't need two versions of dns_name_towire(), we can just add NULL
to the calls that don't need to specify a compression offset.
2023-08-31 10:29:16 -07:00
Evan Hunt
a290ed5bd0
remove dns_name_fromstring2()
...
we don't need two versions of dns_name_fromstring() any longer; we
can just specify an origin value of dns_rootname for absolute names.
2023-08-31 10:29:16 -07:00
Evan Hunt
6909897adf
remove cfg_acl_fromconfig2()
...
the extra option to limit ACL configuration to only one address family
was no longer in use, and has been removed.
2023-08-31 10:29:16 -07:00
Matthijs Mekking
ac2b9280f2
Merge branch '4266-document-dnssec-policy-lifetime' into 'main'
...
Clarify BIND 9 time formats
Closes #4266
See merge request isc-projects/bind9!8228
2023-08-31 16:30:26 +00:00
Matthijs Mekking
fd3d58d512
Add CHANGES entry for #4266
2023-08-31 17:43:15 +02:00
Matthijs Mekking
b5a757c452
Explain lifetime format
...
Add the text "TTL-style unit suffixes or ISO 8601 duration formats",
just like we do at other places that are duration option types.
Also, in the dnssec-policy "keys" example, use a TTL-style unit too.
2023-08-31 17:42:52 +02:00
Matthijs Mekking
cc122d22b4
Add a glossary definition for duration
...
We don't yet explain the syntax of TTL-style suffixes or ISO 8601
duration formats.
2023-08-31 17:42:52 +02:00
Matthijs Mekking
07c70ea2bd
Fix keys reference link in ARM
...
There's a statement that says: "Here is an example (for illustration
purposes only) of some possible entries in a [keys] list:", and that
links to the wrong "keys" statement (it links to the TSIG keys section).
Remove the reference, as we are already in the right section.
2023-08-31 17:42:52 +02:00
Matthijs Mekking
509b911a50
Merge branch 'tt-arm-pkcs11-update' into 'main'
...
Update PKCS#11 section in the ARM
See merge request isc-projects/bind9!8258
2023-08-31 15:42:07 +00:00
Timo Teräs and Matthijs Mekking
38df202cdb
Update PKCS#11 section in the ARM
...
Add instructions for pkcs11-provider and generalize common sections.
2023-08-31 15:41:39 +00:00
Michal Nowak
6f53d34201
Merge branch 'mnowak/unify-doc-tools-versions' into 'main'
...
Install Sphinx tools versions from BIND 9 repository
See merge request isc-projects/bind9!8251
2023-08-31 12:50:04 +00:00
Michal Nowak
520e97e2fc
Install Sphinx tools versions from BIND 9 repository
...
The doc/arm/requirements.txt file is the single source of truth when it
comes to Sphinx tools versions used to build documentation via
util/release-tarball-comparison.sh.
2023-08-31 14:31:57 +02:00
Arаm Sаrgsyаn
3e5ccc3089
Merge branch 'aram/zone.c-got_transfer_quota-bugfix' into 'main'
...
Reset the 'result' before using it again in zone.c:got_transfer_quota()
See merge request isc-projects/bind9!8241
2023-08-31 09:41:34 +00:00
Ondřej Surý and Arаm Sаrgsyаn
00cb151f8e
Unobfuscate the code-flow logic in got_transfer_quota()
...
This refactors the code flow in got_transfer_quota() to not use the
CHECK() macro as it really obfuscates the code flow logic here.
2023-08-31 09:40:54 +00:00
Aram Sargsyan
6cab7fc627
Reset the 'result' before using it again
...
The 'result' variable should be reset to ISC_R_NOTFOUND again,
because otherwise a log message could be logged about not being
able to get the TLS configuration based on on the 'result' value
from the previous calls to get the TSIG key.
2023-08-31 09:40:54 +00:00
Matthijs Mekking
3f34b692e6
Merge branch '4278-rndc-flush-resets-stale-refresh-time-to-0' into 'main'
...
Restore serve-stale settings after cache flush
Closes #4278
See merge request isc-projects/bind9!8244
2023-08-31 09:08:52 +00:00
Matthijs Mekking
9523eb70f6
Add release note and CHANGES for #4278
2023-08-31 11:08:12 +02:00
Matthijs Mekking
3ae721db6c
After cache flush, restore serve-stale settings
...
When flushing the cache, we create a new cache database. The serve-stale
settings need to be restored after doing this. We already did this
for max-stale-ttl, but forgot to do this for stale-refresh-time.
2023-08-31 11:07:35 +02:00
Matthijs Mekking
0f593fd70a
Add serve-stale test settings after flush
...
Add a test case to ensure that after 'rndc flush', the serve-stale
settings are not reset.
2023-08-31 11:07:35 +02:00
Mark Andrews
cd837f4e40
Merge branch '4170-extend-expire-opt-support-into-xfrin-c' into 'main'
...
Resolve "Extend EXPIRE opt support into xfrin.c"
Closes #4170
See merge request isc-projects/bind9!8064
2023-08-31 08:03:32 +00:00