Commit Graph
219 Commits
Author SHA1 Message Date
Witold Kręcicki 68e9479f41 Remove layering from isc_task, isc_app, isc_socket, isc_timer, isc_mem 2018-09-05 09:44:07 +02:00
Ondřej Surý 388d6db5a1 Remove support for legacy systems without inet_{ntop,pton} w/ IPv6 support 2018-08-28 10:31:48 +02:00
Ondřej Surý 7b21bbb7c1 Require IPv6 support from the OS 2018-08-28 10:31:47 +02:00
Ondřej Surý 00ca487fec We always want IPv6 2018-08-28 10:31:47 +02:00
Witold Kręcicki 5cdb38c2c7 Remove unthreaded support 2018-08-16 17:18:52 +02:00
Mark AndrewsandEvan Hunt 5dd1beec8e mempool didn't work for sizes less than sizeof(void*) 2018-08-14 03:47:14 -04:00
Ondřej Surý 994e656977 Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
Ondřej Surý cb6a185c69 Replace custom isc_u?intNN_t types with C99 u?intNN_t types 2018-08-08 09:37:28 +02:00
Ondřej Surý 64fe6bbaf2 Replace ISC_PRINT_QUADFORMAT with inttypes.h format constants 2018-08-08 09:36:44 +02:00
Ondřej Surý 20faf4652a Change isc_buffer_reallocate() into a static functions as it is not used outside of isc_buffer_reserve() 2018-07-31 22:00:30 +02:00
Ondřej Surý 7785f644c3 Remove illogical condition from isc_buffer_reallocate that would return ISC_R_NOSPACE when requested size is less than available size 2018-07-31 22:00:30 +02:00
Ondřej Surý 71877806e8 Fix ax_check_openssl to accept yes and improve it to modern autotools standard 2018-07-23 22:10:52 +02:00
Ondřej Surý 083461d332 Fix the isc_safe_memwipe() usage with (NULL, >0) 2018-07-20 10:08:24 -04:00
Ondřej Surý b105ccee68 Remove isc_safe_memcompare, it's not needed anywhere and can't be replaced with CRYPTO_memcmp() 2018-07-20 10:06:14 -04:00
Mark AndrewsandOndřej Surý 4c3386ad95 remove lib/isc/print.c and lib/isc/tests/print_test.c 2018-07-19 23:24:28 -04:00
Ondřej Surý c3b8130fe8 Make OpenSSL mandatory 2018-07-19 12:47:03 -04:00
Ondřej SurýandOndřej Surý 07910f0153 Integrate cmocka unit testing framework to kyua 2018-06-20 06:30:07 -04:00
Ondřej Surý edcdfe9619 Disable the random_test from the regular kyua run, we are either using cryptolib PRNG or non-CS PRNG 2018-06-05 22:49:14 +02:00
Ondřej Surý 99ba29bc52 Change isc_random() to be just PRNG, and add isc_nonce_buf() that uses CSPRNG
This commit reverts the previous change to use system provided
entropy, as (SYS_)getrandom is very slow on Linux because it is
a syscall.

The change introduced in this commit adds a new call isc_nonce_buf
that uses CSPRNG from cryptographic library provider to generate
secure data that can be and must be used for generating nonces.
Example usage would be DNS cookies.

The isc_random() API has been changed to use fast PRNG that is not
cryptographically secure, but runs entirely in user space.  Two
contestants have been considered xoroshiro family of the functions
by Villa&Blackman and PCG by O'Neill.  After a consideration the
xoshiro128starstar function has been used as uint32_t random number
provider because it is very fast and has good enough properties
for our usage pattern.

The other change introduced in the commit is the more extensive usage
of isc_random_uniform in places where the usage pattern was
isc_random() % n to prevent modulo bias.  For usage patterns where
only 16 or 8 bits are needed (DNS Message ID), the isc_random()
functions has been renamed to isc_random32(), and isc_random16() and
isc_random8() functions have been introduced by &-ing the
isc_random32() output with 0xffff and 0xff.  Please note that the
functions that uses stripped down bit count doesn't pass our
NIST SP 800-22 based random test.
2018-05-29 22:58:21 +02:00
Evan Hunt e324449349 remove the experimental authoritative ECS support from named
- mark the 'geoip-use-ecs' option obsolete; warn when it is used
  in named.conf
- prohibit 'ecs' ACL tags in named.conf; note that this is a fatal error
  since simply ignoring the tags could make ACLs behave unpredictably
- re-simplify the radix and iptable code
- clean up dns_acl_match(), dns_aclelement_match(), dns_acl_allowed()
  and dns_geoip_match() so they no longer take ecs options
- remove the ECS-specific unit and system test cases
- remove references to ECS from the ARM
2018-05-25 08:21:25 -07:00
Ondřej SurýandEvan Hunt 7ee8a7e69f address win32 build issues
- Replace external -DOPENSSL/-DPKCS11CRYPTO with properly AC_DEFINEd
  HAVE_OPENSSL/HAVE_PKCS11
- Don't enforce the crypto provider from platform.h, just from dst_api.c
  and configure scripts
2018-05-22 16:32:21 -07:00
Tinderbox User 9536688b37 regenerate doc 2018-05-21 19:59:45 +00:00
Mark Andrews 6bff1768cf ISC_SOCKEVENTATTR_TRUNC was not be set 2018-05-18 15:34:48 +10:00
Ondřej SurýandWitold Kręcicki 3a4f820d62 Replace all random functions with isc_random, isc_random_buf and isc_random_uniform API.
The three functions has been modeled after the arc4random family of
functions, and they will always return random bytes.

The isc_random family of functions internally use these CSPRNG (if available):

1. getrandom() libc call (might be available on Linux and Solaris)
2. SYS_getrandom syscall (might be available on Linux, detected at runtime)
3. arc4random(), arc4random_buf() and arc4random_uniform() (available on BSDs and Mac OS X)
4. crypto library function:
4a. RAND_bytes in case OpenSSL
4b. pkcs_C_GenerateRandom() in case PKCS#11 library
2018-05-16 09:54:35 +02:00
Ondřej Surý 55a10b7acd Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
Mark AndrewsandMichał Kępień 6aae115d15 silence cppcheck portability warning 2018-05-11 08:12:17 +02:00
Ondřej SurýandOndřej Surý 8d3220643c Also test the higher part of the confidence interval 2018-05-03 08:30:31 -04:00
Mark AndrewsandOndřej Surý 49f8e9571c use %u instead of %d for unsigned int arguments 2018-04-20 14:50:35 -07:00
Ondřej Surý b097be17ef Remove unused obsolete isc_hash_* function, and just keep the FNV-1a version 2018-04-04 23:12:14 +02:00
Evan Hunt 0fabe0da83 update file headers 2018-03-15 18:33:13 -07:00
Evan HuntandCurtis Blackburn 1b3eac926e add an 'untested' case when none of the atomic operations are available
- this fixes a build failure introduced in change 4913 when
  compiling with ATF and --disable-atomic
2018-03-15 14:15:20 -04:00
Evan Hunt 56353aaf42 Fix compiler warnings and test failures when building without threads 2018-03-10 10:35:31 -08:00
Evan Hunt a173c9c18f add missing includes 2018-03-09 16:55:21 -08:00
Evan Hunt 86e00cbb71 final cleanup
- update Kyuafiles to match Atffiles
- copyrights
- CHANGES note
2018-03-09 14:12:50 -08:00
Evan Hunt 9b753aa154 shorten ht_test and random_test 2018-03-09 14:12:50 -08:00
Evan Hunt c6c1e99252 migrate t_tasks to lib/isc/tests/task_test 2018-03-09 14:12:49 -08:00
Evan Hunt e2b8699df9 migrate t_timers to lib/isc/tests/timer_test 2018-03-09 14:12:49 -08:00
Evan Hunt 874e2fc70c migrate t_atomic to lib/isc/tests/atomic_test 2018-03-09 14:12:48 -08:00
Evan Hunt 979f054702 migrate t_mem to lib/isc/tests/mem_test 2018-03-09 14:12:48 -08:00
Evan Hunt 05b7251d51 migrate t_net to lib/isc/tests 2018-03-09 14:12:48 -08:00
Evan Hunt 62f650078a migrate t_sockaddr to lib/isc/tests 2018-03-09 14:12:48 -08:00
Mark AndrewsandEvan Hunt b71a1386ed remove deadcode 2018-02-24 17:50:41 -08:00
Evan Hunt 3c028ed07d Merge branch 'kyua-oot' into 'master'
chg: dev: Unit tests were broken in out-of-tree builds.

See merge request isc-projects/bind9!57
2018-02-23 18:22:59 -05:00
Ondřej Surý 843d389661 Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
Petr Menšík 95cde3608a unit/unittest.sh is generated by configure. It will always be
generated into builddir. If out-of-tree build is used, make unit
will always fail. Kyuafiles and testdata still have to be copied
manually into the builddir.
2018-02-22 15:32:16 +01:00
Tinderbox User 5fdca0da2f update copyright notice / whitespace 2018-02-01 23:46:26 +00:00
Michał Kępień a3c2b8831e [master] Silence compiler warnings about comparisons between signed and unsigned integers [RT #46980] 2018-02-01 21:28:47 +01:00
Francis Dupont 614d838acf Merged rt46864 (check MD5 amd SHA1 support) 2018-01-17 14:33:21 +01:00
Tinderbox User 3d2a6c9949 update copyright notice / whitespace 2018-01-16 23:45:57 +00:00
Michał Kępień 73819362d8 [master] Simplify handling isc_socket_sendto2() return values when flags == 0
4865.	[cleanup]	Simplify handling isc_socket_sendto2() return values.
			[RT #46986]
2018-01-16 08:33:30 +01:00