32 Commits

Author SHA1 Message Date
Arzhan Kinzhalin e4743d8273 Fix tests.
Corrected expected file counts in the store where ls or find are used.
It's count + 1 now due to extra symlink clrtrust generates.
2019-01-02 14:03:31 -08:00
Arzhan Kinzhalin 32cbe1fd84 Do not exit with error on duplicates.
Fixes #17.
2018-10-03 16:09:54 -07:00
Arzhan Kinzhalin 35da1895e6 Add helper binary for bulk certificate processing.
Instead of launching 'openssl x509' for each file, use small binary to
process files in bulk. This optimization improves performance more than
7 times (measured on store generation). Performance of 'clrtrust
generate' is important for first-time booting.
2018-04-16 00:43:56 -07:00
Arzhan Kinzhalin 767d2344ae Fix incorrect handling of unrecognized commands.
Fixes #13.
2018-02-27 15:50:00 -08:00
Arzhan Kinzhalin 36438761f8 Skip some tests in mock build env. 2018-02-15 04:28:30 +00:00
Arzhan Kinzhalin 70a4f51dfd Implement c_rehash.
This gets rid of hard dependency on external c_rehash implementation. If
there's an external command available, it will be used, otherwise
clrtrust will use its own implementation of c_rehash.

An option is added (-c or --internal-rehash) to force use of the
internal implementation.
2017-12-22 00:54:55 -08:00
Arzhan Kinzhalin eddc36ab55 Fix the function syntax, minor output cleanup. 2017-12-20 01:08:19 +00:00
Arzhan Kinzhalin ebd3f2655f Improve/modernize shell syntax. Minor refactoring.
As per code review.
2017-12-20 01:07:43 +00:00
Arzhan Kinzhalin d6a3052369 Implement basic check functionality. 2017-12-18 12:18:17 -08:00
Arzhan Kinzhalin 21c657c5c7 Fix test description. 2017-12-13 23:30:07 +00:00
Arzhan Kinzhalin 57ed0533c6 Handle spaces in filenames properly. 2017-11-07 08:16:06 +00:00
Arzhan Kinzhalin b097805918 Fix the issue with add/remove.
When the local trust sources are not present, add and remove fail to add
certificates.
2017-10-05 19:20:57 +00:00
Arzhan Kinzhalin f1bb549b8d Fix issue with multiple duplicates. 2017-10-01 22:55:03 +00:00
Arzhan Kinzhalin 6830bff00b Fail if remove args are not X.509 certs. 2017-09-29 00:11:50 +00:00
Arzhan Kinzhalin f04e6292a2 Organize error handling. 2017-09-28 18:28:31 +00:00
Arzhan Kinzhalin 0882ad620a Generate PEM bundle. 2017-09-21 09:02:19 +00:00
Arzhan Kinzhalin ba48733abd Handle duplicates gracefully on generate. 2017-09-18 18:45:41 +00:00
Arzhan Kinzhalin a2f07392b2 Add --force to add command.
Allow adding trust to non-root certificate. Adding leaf or intermediate
certificates can cause inconsistent behavior, depending on the
implementation of cert chain verification. However, it might be
necessary in some cases of very broken implementation of peers (e.g.
badly configured web servers).
2017-09-05 20:09:59 +00:00
Arzhan Kinzhalin a5f9cb4240 Check if the certificate is distrusted on add. 2017-08-24 01:03:22 +00:00
Arzhan Kinzhalin 64b7421544 Add test for non-certificate. 2017-07-29 00:19:53 +00:00
Arzhan Kinzhalin c808831ba5 Use $() syntax instead of `` in tests as well. 2017-07-29 00:19:53 +00:00
Arzhan Kinzhalin 01ba7be8f7 Remove the test store on clean up. 2017-07-29 00:19:53 +00:00
Arzhan Kinzhalin d8e9d8ac98 Refactor/simplify the tests. Fix verbose mode. 2017-07-29 00:19:53 +00:00
Arzhan Kinzhalin 2385179211 Remove the certificates properly.
The CLR_CLEAR_TRUST_SRC is immutable. If we remove trust to
Clear-supplied CA, then it should be distrusted as opposed to removed.
2017-07-12 23:54:04 -07:00
Arzhan Kinzhalin 677e40801e Implement check for non-root CA when adding. 2017-07-11 22:02:49 +00:00
Arzhan Kinzhalin eac7ec7985 Clean up. Style. Correct tests. 2017-07-11 03:49:31 +00:00
Arzhan Kinzhalin 6aeb2f48a6 Add tests. 2017-07-10 23:19:19 +00:00
Arzhan Kinzhalin cd43cd0c0a Change the meaning of the id from an int to a sha. 2017-07-08 05:45:26 +00:00
Arzhan Kinzhalin c0cadc993c Implement list command. 2017-07-06 07:54:58 +00:00
Arzhan Kinzhalin 3d4b76df76 Implement distrust in generate. 2017-07-01 04:35:18 +00:00
Arzhan Kinzhalin c7d1371ad7 Add Intel Corporation copyright. 2017-07-01 01:24:05 +00:00
Arzhan Kinzhalin 3d79c36589 Add test infrastructure and 'make check' target.
Most of the tests are for the 'generate' command. Features not
implemented are skipped to ensure ca-certs package is buildable.
2017-06-30 07:01:43 +00:00