89 Commits

Author SHA1 Message Date
Robert Dower 540d2cbd22 archive repository 2025-08-07 13:28:44 -07:00
William Douglas 2a1bde2927 Add release process document
Signed-off-by: William Douglas <william.douglas@intel.com>
2022-10-24 13:55:32 -07:00
Patrick McCarty c757135440 Fix compatibility with openssl 3
Passing the `-SHA1` flag instead of `-sha1` for these commands preserves
the expected capitalization of the output for later processing.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
v0.1.4
2022-10-21 11:24:34 -07:00
puneetse f24e620d7e Update .gitignore
Ignore files that are not markdown files in man directory.
v0.1.3
2020-04-06 09:56:07 -07:00
puneetse d6b67111a4 Update README.md
Simplify README to highlight Clear Linux OS implementation and link to the manpage for usage information.
2020-04-06 09:56:07 -07:00
puneetse 34ba387c1c Add manpage
Add a manpage for clrtrust and Makefile entries for building
from markdown
2020-04-06 09:56:07 -07:00
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.
v0.1.2
2019-01-02 14:03:31 -08:00
Ikey Doherty 82f66efec6 Produce compatibility symlink for statically linked programs
This link, in combination with the /etc/ssl/certs symlink through tmpfiles,
will create the compatibility path /etc/ssl/certs/ca-certificates.crt.
This will help with statically linked (and hardcoded) programs such as
Go binaries or the Steam client.

Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
2019-01-02 12:13:06 -08:00
Arzhan Kinzhalin e7990a78f5 Ensure openssl is usable.
Fixes #11.
v0.1.1
2018-10-09 17:17:04 -07:00
Arzhan Kinzhalin 32cbe1fd84 Do not exit with error on duplicates.
Fixes #17.
2018-10-03 16:09:54 -07:00
California Sullivan ac9228539d clrtrust-helper.c: use int c instead of char c
getopt returns an int rather than a char. We should we not be relying on
automatic type casting. Further, some compilers have char as unsigned
which will break the program at the ((c = getopt(argc, argv, "fs")) != -1)
evaluation with default compiler options.

Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
2018-10-03 16:06:42 -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.
v0.1.0
2018-04-16 00:43:56 -07:00
Arzhan Kinzhalin f7f936a6a0 Simplify implementation of add and remove.
'add' command performs each individual action in place (and turns off default
signals while doing it).
v0.0.8
2018-03-09 00:09:58 -08:00
Arzhan Kinzhalin 4228ed651e Avoid reporting command when there's no command. 2018-03-08 13:12:36 -08:00
Arzhan Kinzhalin df727049a4 Fix the locking issue when there's no /var/lock.
Make clrtrust pick first available well-known dir to use as the location of the
lock file. Also, bail if there's no way to create a lock.

Fixes #14.
2018-03-08 09:47:34 -08: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. v0.0.7 2018-02-15 04:28:30 +00:00
Arzhan Kinzhalin 12503a6a96 Do not generate empty store unless forced.
Empty store is a sign of trouble. A corner case is when all the certificates are
distrusted. Make sure a set of trusted certificates is present before generating
the store. This only applies to the system store.

Also, add '--force' (or '-f') option to be able to force the generation of the
store.
2018-02-15 03:41:05 +00:00
Arzhan Kinzhalin 6941fd616f Serialize store generation, ignore some signals.
In case the store being generated is the system store, ignore HUP, INT and TERM
while it's being generated and serialize store write section of the code.
2018-02-14 15:57:21 -08:00
Arzhan Kinzhalin 41a3ba251f Add check to support mock chroot environment. 2017-12-22 19:50:15 +00:00
Arzhan Kinzhalin a089fed478 Check for variations of textually encoded cert.
Specifically, account for 'BEGIN X509 CERTIFICATE' and 'BEGIN TRUSTED
CERTIFICATE' markers.
2017-12-22 18:40:44 +00:00
Arzhan Kinzhalin fbf8e0e1af Add link to the full license text. 2017-12-22 08:58:04 +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 42bfb042c2 Fix typo. 2017-12-21 06:26:18 +00:00
Arzhan Kinzhalin b5629dee8e Add check: a cert file must contain a single cert.
The check is currently performed only on 'add'. It will be included into
'check' later, when 'check' will be validating certificates.
2017-12-20 01:08:19 +00: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 2235f501f6 Correct cert format conversion command. 2017-11-27 16:11:17 +00:00
Arzhan Kinzhalin a37c530e4e Add README.md.
Closes #1.
2017-11-08 01:55:36 +00:00
Arzhan Kinzhalin 57ed0533c6 Handle spaces in filenames properly. v0.0.5 2017-11-07 08:16:06 +00:00
Arzhan "kai" Kinzhalin 198cedb24c Merge pull request #5 from lfelipe/fix-func-call
Fix function call.
2017-10-16 22:20:20 -07:00
Luis Felipe Strano Moraes 4f599e39d7 Fix function call. 2017-10-16 21:57:03 -07: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.
v0.0.4
2017-10-05 19:20:57 +00:00
Arzhan Kinzhalin f1bb549b8d Fix issue with multiple duplicates. v0.0.3 2017-10-01 22:55:03 +00:00
Arzhan Kinzhalin 6830bff00b Fail if remove args are not X.509 certs. v0.0.2 2017-09-29 00:11:50 +00:00
Arzhan Kinzhalin 3a536574e9 Clean up, fix documentation. 2017-09-28 20:14:29 +00:00
Arzhan Kinzhalin cd0eb4be30 Remove unused function. 2017-09-28 18:32:43 +00:00
Arzhan Kinzhalin f04e6292a2 Organize error handling. 2017-09-28 18:28:31 +00:00
Arzhan Kinzhalin b3a163e510 Change use of SHA256 to SHA1.
Mozilla stores information on the distrusted certificates as SHA1 and
no certificate file itself. In order to make easier to support
Mozilla-distrusted certificates in the future, use the same digest as
the primary source of the trust information (Mozilla) does.
2017-09-28 17:25:29 +00:00
Arzhan Kinzhalin e915b5c06f Add license (GPLv2). v0.0.1 2017-09-25 17:26:48 +00:00
Arzhan Kinzhalin 0882ad620a Generate PEM bundle. 2017-09-21 09:02:19 +00:00
Arzhan Kinzhalin 8777cfb3a5 Minor clean up. 2017-09-19 16:18:05 +00:00
Arzhan Kinzhalin ba48733abd Handle duplicates gracefully on generate. 2017-09-18 18:45:41 +00:00
Arzhan Kinzhalin 67b7c29083 Generate corresponding Java keystore.
Using p11-kit generate Java keystore in compat/.
2017-09-18 05:17:29 +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 824653e7a6 Set proper permissions on stage. 2017-08-23 17:28:35 +00:00
Arzhan Kinzhalin 42d18b2a50 Add cmd_check. Make distrusted dir before copying. 2017-08-23 17:27:04 +00:00