0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 18:08:45 +00:00
Commit Graph

251 Commits

Author SHA1 Message Date
Pavel Tvrdík
5aa9ab0cfd SHA & MD5 libs: changing headers 2015-05-13 09:27:44 +02:00
Pavel Tvrdík
d16b33f556 SHA512: Fixing bug in SHA512 & SHA384
SHA512/SHA384 are using the SHA256 update and differs in the transform function.
This adds a pointer to transform function into a SHA context.
2015-05-12 12:46:26 +02:00
Pavel Tvrdík
5a12cc27f7 SHA512: small changes in code style 2015-05-12 12:46:26 +02:00
Pavel Tvrdík
a777dff865 SHA512 Tests: Fixing the expected hashes 2015-05-12 12:46:26 +02:00
Pavel Tvrdík
9f2c0ca0ef SHA Tests: Use a longer (160-length) string 2015-05-12 12:46:11 +02:00
Pavel Tvrdík
5beaaa3d6b SHA: only renamed hd -> ctx 2015-05-12 12:24:28 +02:00
Pavel Tvrdík
f84f925036 Birdtest: add IPv6 unit test for convert '::' 2015-04-29 16:50:38 +02:00
Pavel Tvrdík
71adc0f9e2 Add HMAC-SHA384 and HMAC-SHA512 (both not work!) 2015-04-29 16:50:38 +02:00
Pavel Tvrdík
e7ac4efd54 HMAC-SHA256, HMAC-SHA224 according to HMAC-SHA1
Successfully passed unit tests.
2015-04-29 16:49:44 +02:00
Pavel Tvrdík
b813656c58 SHA: Fixing broken build process 2015-04-29 13:43:15 +02:00
Pavel Tvrdík
5355407915 Add SHA512 and SHA384 hash library and unit tests 2015-04-28 17:05:29 +02:00
Pavel Tvrdík
ac2dc0510f Add HMAC-SHA224 (but it does not work yet!)
Unit Tests for HMAC-SHA224 not passed
2015-04-28 17:02:28 +02:00
Pavel Tvrdík
e4e80e4f8f SHA256: Integrate sha256_hmac into sha256 2015-04-28 16:58:44 +02:00
Pavel Tvrdík
6d3c17d5c2 SHA1: Integrate sha1_hmac.c into sha1.c 2015-04-28 16:58:44 +02:00
Pavel Tvrdík
17a0035a1c SHA: Fixing small bugs and code style
Thanks to Ondrej Zajicek
2015-04-28 16:58:31 +02:00
Pavel Tvrdík
c23cd84ed5 Add HMAC-SHA256 hash library and unit tests 2015-04-25 13:43:49 +02:00
Pavel Tvrdík
26b1fd1dc4 Add SHA256, SHA224 hash libraries and unit tests 2015-04-23 15:19:36 +02:00
Pavel Tvrdík
16e4e98ea0 SHA1: Code formatting 2015-04-23 15:19:26 +02:00
Pavel Tvrdík
5015dceee0 SHA1: Remove original libucw unit tests 2015-04-23 15:19:26 +02:00
Pavel Tvrdík
24ff638db2 SHA1: Use get_u32 and put_u32 2015-04-23 11:27:36 +02:00
Pavel Tvrdík
dd78aae55c SHA-1: safer endianity 2015-04-22 17:45:14 +02:00
Pavel Tvrdík
57453a3c5f Fixing copyrights at SHA-1 and HMAC-SHA1 libraries 2015-04-22 12:12:05 +02:00
Pavel Tvrdík
828e091013 Add SHA-1 and HMAC-SHA1 libraries with unit tests
Refactore MD5 tests
2015-04-22 11:15:38 +02:00
Pavel Tvrdík
259e7e0f67 Merge branch 'master' into birdtest 2015-04-20 16:27:48 +02:00
Pavel Tvrdík
a22d36256e Birdtest: Refactore functions (only rename) 2015-04-20 13:50:33 +02:00
Pavel Tvrdík
5419d2a3c5 Birdtest: Compability bug fixes
Tested on Ubuntu & FreeBSD & NetBSD & OpenBSD
2015-04-15 15:42:43 +02:00
Pavel Tvrdík
60c2d0c39f Birdtest: Add tests suites for SLIST datastructure 2015-04-15 12:14:36 +02:00
Pavel Tvrdík
979dc9e65e Birdtest: Refactore some tests
lib/bitops_test.c
lib/ip_test.c
lib/lists_test.c
lib/md5_test.c
2015-04-15 12:11:50 +02:00
Pavel Tvrdík
84dbe05f93 Birdtest: Extend IP addr funcs Tests 2015-04-13 10:59:20 +02:00
Pavel Tvrdík
db781b9004 Birdtest: Rewrite MD5 unit test 2015-04-13 10:57:47 +02:00
Pavel Tvrdík
a84b9c62d1 Birdtest: Add bt_assert_fn_in_*
- Improved test output formating: aligned, colored [ OK ] / [FAIL]
- A failed assert will not interupt the whole test suite
- bt_assert_fn_in_* are macros for testing input and output from the some
  function
2015-04-13 10:52:21 +02:00
Pavel Tvrdík
947018a7ef Birdtest: bt_test_case() -> bt_test_suite() 2015-04-13 10:42:10 +02:00
Pavel Tvrdík
9a49b70d1b Birdtest: Add IP addr funcs Tests (not complete) 2015-04-03 12:55:36 +02:00
Pavel Tvrdík
89ee134e2f Birdtest: Add Hash Tests 2015-04-03 12:54:54 +02:00
Pavel Tvrdík
83131f3fa5 Birdtest: Add Event Processing Tests
Add test/birdtest_support.h for provisional hack a build system
2015-04-03 12:52:44 +02:00
Pavel Tvrdík
e331e3635e Birdtest: Small improve in checksum test 2015-04-03 12:51:05 +02:00
Pavel Tvrdík
a35f717f0f lib/ip.c: add parenthesis for better readability 2015-04-03 12:49:21 +02:00
Pavel Tvrdík
e7bb2daf1f Birdtest: improve bt_check macro
Now dat for testing can be defined somelike this:

  struct in_out_data_ {
    char *in;
    u32 out;
  } in_out_data[] = {
      {
	  .in  = "192.168.1.128",
	  .out = build_ip4(192, 168, 1, 128),
      },
      {
	  .in  = "255.255.255.255",
	  .out = build_ip4(255, 255, 255, 255),
      },
      ...
  };

  bt_check(ip4_pton_, in_out_data, "%s", "0x%08X");
2015-04-03 12:46:04 +02:00
Pavel Tvrdík
d73e21e611 Birdtest: IP One-Complement Checksum Tests 2015-03-30 18:54:09 +02:00
Pavel Tvrdík
7379684211 Birdtest: small fix in md5_test 2015-03-30 18:52:58 +02:00
Pavel Tvrdík
3bbe27472c Birdtest: Add test for lib/bitops.c 2015-03-27 14:10:28 +01:00
Pavel Tvrdík
733088e798 Birdtest: Add test for lib/buffer_test.c 2015-03-27 14:10:00 +01:00
Pavel Tvrdík
c19954e74d Birdtest: Add test for lib/md5.c 2015-03-27 14:09:27 +01:00
Pavel Tvrdík
3c2ac3887e Birdtest: Refactorize heap_test.c and lists_test.c 2015-03-27 14:08:39 +01:00
Pavel Tvrdík
f26cf70152 Birdtest: Refactore tests and build system
Rename directory:
  birdtest/* -> test/*

Rename Makefile rule:
  build-tests -> tests

Move run-all-test shell script from Makefile to stand-alone shell script

Simplify Makefile test build system
2015-03-23 17:40:13 +01:00
Pavel Tvrdík
99d14b1ab3 Add header wrap defines to lib/buffer.h 2015-03-19 18:42:33 +01:00
Pavel Tvrdík
a2cdd9532d Addition necessary includes in headers files 2015-03-17 12:39:10 +01:00
Pavel Tvrdík
53e27ec79d Separate a definition of NULL to standalone header
A lib/list.h had circular dependency through include nest/bird.h
  nest/bird.h requires lib/birdlib.h
  lib/birdlib.h requires timer.h
  timer.h requires lib/resource.h
  lib/resource.h requires lib/list.h
2015-03-17 12:31:14 +01:00
Pavel Tvrdík
e8b3845e86 Birdtest: Add default timeout and forking setting 2015-03-17 11:27:40 +01:00
Pavel Tvrdík
a8a67537ed Add unit tests for lib/lists.c datastructures 2015-03-13 18:37:21 +01:00