Commit Graph

26847 Commits

Author SHA1 Message Date
Michał Kępień
e93a950b70 Merge branch 'refactor-update-sigs' into 'master'
Refactor update_sigs()

See merge request isc-projects/bind9!10
2018-05-10 03:54:53 -04:00
Michał Kępień
65975a3b5f Add CHANGES entry
4940.	[cleanup]	Extract the loop in dns__zone_updatesigs() into
			separate functions to improve code readability.
			[GL #135]
2018-05-10 09:43:38 +02:00
Michał Kępień
0ee14aa594 Use a while loop instead of a for loop in dns__zone_updatesigs()
Replace the outer for loop with a while loop to emphasize it keeps
processing the first element of diff->tuples, which changes on each
iteration due to tuples being removed from diff->tuples by
move_matching_tuples().
2018-05-10 09:43:38 +02:00
Michał Kępień
15afdf94ef Remove redundant assertions
The ENSURE assertion at the end of dns_diff_appendminimal() is not
needed because it is placed right after code which resets *tuplep to
NULL if it is not NULL already.

The INSIST assertion in move_matching_tuples() checks the same pointer
again.
2018-05-10 09:43:38 +02:00
Michał Kępień
1bd5f61c60 Look for the next matching tuple in a separate function
Extract the portion of the do-while loop responsible for finding the
next tuple with the same name and type into a separate function to
improve code clarity.
2018-05-10 09:43:38 +02:00
Michał Kępień
31cdf770a4 Extract the do-while loop in dns__zone_updatesigs() into a separate function
The do-while loop in dns__zone_updatesigs() is hard to follow due to
heavy nesting and the 'tuple' variable also being used in the outer for
loop.  Add a comment to explain the purpose of the do-while loop.
Extract it into a separate function to decrease indentation and prevent
using 'tuple' in two different loops.
2018-05-10 09:43:38 +02:00
Ondřej Surý
3c40aa004a Merge branch 'gitlab-ci-amd64' into 'master'
Tag docker images with appropriate architectures

See merge request isc-projects/bind9!254
2018-05-10 03:21:08 -04:00
Ondřej Surý
ab112d2c4f Tag docker images with appropriate architectures 2018-05-10 02:57:23 -04:00
Evan Hunt
e07f78d76e Merge branch '135-add-basic-unit-tests-for-update_sigs' into 'master'
Add basic unit tests for update_sigs()

Closes #135

See merge request isc-projects/bind9!112
2018-05-09 22:10:47 -04:00
Michał Kępień
4885809eb9 Add CHANGES entry
4939.	[test]		Add basic unit tests for update_sigs(). [GL #135]
2018-05-09 13:32:11 +02:00
Michał Kępień
8b9d2c27b4 Define basic test cases for dns__zone_updatesigs()
Add some basic test cases ensuring dns__zone_updatesigs() behaves as
expected.
2018-05-09 13:32:11 +02:00
Michał Kępień
1f10186476 Add a framework for dns__zone_updatesigs() unit tests
Add a new ATF test, sigs_test, containing everything required to start
defining test cases for dns__zone_updatesigs().  The framework is
written in a way which ensures that changes to zone database applied by
any dns__zone_updatesigs() invocation are preserved between subsequent
checks.
2018-05-09 13:32:09 +02:00
Michał Kępień
d7143986b1 Move find_zone_keys() to lib/dns/zone_p.h
Rename find_zone_keys() to dns__zone_findkeys() and move it to
lib/dns/zone_p.h, so that it can be used in unit tests.  Add a comment
describing the purpose of this function.
2018-05-09 13:21:02 +02:00
Michał Kępień
b1947cee82 Move update_sigs() to lib/dns/zone_p.h
Rename update_sigs() to dns__zone_updatesigs() and move it to
lib/dns/zone_p.h, so that it can be unit tested.  Add a comment
describing the purpose of this function.
2018-05-09 13:21:02 +02:00
Michał Kępień
ace465a9f9 Move zonediff_t to lib/dns/zone_p.h
Rename zonediff_t to dns__zonediff_t and move it to lib/dns/zone_p.h, so
that unit tests can be written for functions taking pointers to
structures of this type as arguments.
2018-05-09 13:21:02 +02:00
Michał Kępień
c1bc3be806 Add lib/dns/zone_p.h
Add a new private header file, lib/dns/zone_p.h, which will hold type
definitions and function prototypes not meant to be exported by libdns,
but required by zone-related unit tests.
2018-05-09 13:21:02 +02:00
Michał Kępień
3c22af0d35 Add a helper function to facilitate preparing dns_diff_t structures
Implement dns_test_difffromchanges(), a function which enables preparing
a dns_diff_t structure from a mostly-textual representation of zone
database changes to be applied.  This will improve readability of test
case definitions by allowing contents of a dns_diff_t structure, passed
e.g. to update_sigs(), to be represented in a human-friendly manner.
2018-05-09 13:21:01 +02:00
Michał Kępień
2980cbd55f Rename dns_test_rdata_fromstring() to dns_test_rdatafromstring()
Remove the underscore from "rdata_fromstring" so that all helper
functions for libdns tests use a common naming covention.
2018-05-09 13:14:24 +02:00
Michał Kępień
bfbeef3609 Rework dns_test_makezone()
The dns_test_makezone() helper function always assigns the created zone
to some view, which is not always necessary and complicates cleanup of
non-managed zones as they are required not to be assigned to any view.

Rework dns_test_makezone() in order to make it easier to use in unit
tests operating on non-managed zones.  Use dns_name_fromstring() instead
of dns_name_fromtext() to simplify code.  Do not use the CHECK() macro
and add comments to make code flow simpler to follow.  Use
dns_test_makeview() instead of dns_view_create().

Adjust existing unit tests using this function so that they still pass.
2018-05-08 12:26:53 +02:00
Michał Kępień
dc1ac23b9f Merge branch 'use-clang-6.0' into 'master'
Use clang 6.0 in clang CI jobs

See merge request isc-projects/bind9!250
2018-05-08 04:46:59 -04:00
Michał Kępień
7e650ebee4 Use clang 6.0 in clang CI jobs 2018-05-08 10:36:52 +02:00
Evan Hunt
f0d3fe5d95 Merge branch 'placeholder' into 'master'
placeholder

See merge request isc-projects/bind9!248
2018-05-04 20:51:14 -04:00
Evan Hunt
a27b1d4d32 placeholder 2018-05-04 17:50:17 -07:00
Ondřej Surý
63c3a6444b Merge branch '219-new-coverity-warnings' into 'master'
Resolve "New Coverity Warnings"

Closes #219

See merge request isc-projects/bind9!225
2018-05-03 11:18:28 -04:00
Mark Andrews
5613c3441f if _headers is NULL don't process If-Modified-Since 2018-05-03 11:08:59 -04:00
Mark Andrews
8801c65a4b insist option != NULL and initalise last to NULL 2018-05-03 11:08:59 -04:00
Mark Andrews
7f2863196f check that order is non NULL before calling strtok_r 2018-05-03 11:08:59 -04:00
Ondřej Surý
cd8245077c Merge branch '236-silence-cppcheck-issues-in-lib-dns-dst_parse-c' into 'master'
Resolve "silence cppcheck issues in lib/dns/dst_parse.c"

Closes #236

See merge request isc-projects/bind9!223
2018-05-03 11:03:35 -04:00
Mark Andrews
22fab3199f simplify mask construction 2018-05-03 10:56:32 -04:00
Ondřej Surý
08050d6524 Merge branch '234-add-prerequisite-check-to-rootkeysentinel-for-dnssec-support' into 'master'
Resolve "add prerequisite check to rootkeysentinel for dnssec support"

Closes #234

See merge request isc-projects/bind9!222
2018-05-03 10:36:20 -04:00
Mark Andrews
0fedfcafb5 add bin/tests/system/rootkeysentinel/prereq.sh 2018-05-03 10:27:50 -04:00
Mark Andrews
e713f83064 add dnssec prerequisite test to rootkeysentinel 2018-05-03 10:27:50 -04:00
Ondřej Surý
65320aa38d Merge branch '191-remove-openssl-0.9.x-support' into 'master'
Remove OpenSSL 0.9.x support

Closes #191

See merge request isc-projects/bind9!175
2018-05-03 10:20:56 -04:00
Ondřej Surý
f10e43ac94 Add CHANGES entries
4937.   [func]          Remove support for OpenSSL < 1.0.0 [GL #191]
2018-05-03 16:00:37 +02:00
Ondřej Surý
ea95e83f5c Add release notes about removed support for OpenSSL 0.9.x 2018-05-03 15:55:45 +02:00
Ondřej Surý
61da2bf028 Remove support for OpenSSL < 1.0.0 2018-05-03 15:55:39 +02:00
Ondřej Surý
16e352248d Merge branch '191-misc-improvements' into 'master'
Miscelaneous improvements found when working on #191

See merge request isc-projects/bind9!236
2018-05-03 09:52:33 -04:00
Ondřej Surý
8d648e7a8a Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define 2018-05-03 15:32:43 +02:00
Ondřej Surý
8bf192b4d1 Use BN_hex2bn instead of custom BN_fromhex function 2018-05-03 15:22:15 +02:00
Ondřej Surý
35d2dbb9f5 Fix extra ] in configure.in 2018-05-03 15:22:15 +02:00
Ondřej Surý
f1722ff512 Merge branch '165-always-use-crypto-provider-for-random-data' into 'master'
Always use OpenSSL or PKCS#11 random data providers

Closes #165

See merge request isc-projects/bind9!208
2018-05-03 09:13:00 -04:00
Ondřej Surý
115fbc3540 Add CHANGES entries
4936.   [func]          Always use OpenSSL or PKCS#11 random data providers and
                        remove the configure option --{enable,disable}-crypto-rand.
                        [GL #165]
2018-05-03 15:03:46 +02:00
Evan Hunt
0795dceda7 remove dangling references to --enable-crypto-rand in doc and comments 2018-05-03 15:03:46 +02:00
Ondřej Surý
9a3a257374 Always use random data from the crypto provider 2018-05-03 15:03:46 +02:00
Ondřej Surý
6a49d41c5b Merge branch 'random-test-improvement' into 'master'
Improve random_test to also test the high bound of the confidence interval

See merge request isc-projects/bind9!210
2018-05-03 09:02:09 -04:00
Ondřej Surý
8d3220643c Also test the higher part of the confidence interval 2018-05-03 08:30:31 -04:00
Ondřej Surý
9d1e9ce4bd Merge branch '191-add-LibreSSL-2.7-support' into 'master'
Add LibreSSL 2.7.0 support

Closes #210

See merge request isc-projects/bind9!233
2018-05-03 08:25:40 -04:00
Ondřej Surý
30488dddf0 Add CHANGES entry
4935.   [func]          Add support for LibreSSL >= 2.7.0 (some OpenSSL 1.1.0
                        call were added). [GL #191]
2018-05-03 14:17:17 +02:00
Ondřej Surý
6b9e3b7b06 Workaround LibreSSL 2.7.0-2.7.2 quirk in DH_set0_key 2018-05-03 14:13:32 +02:00
Ondřej Surý
29ff62a149 Add support for LibreSSL 2.7 2018-05-03 14:13:20 +02:00