Commit Graph

8 Commits

Author SHA1 Message Date
279765b22a fix(keyringctl): fix system stderr case due to wrongly written test
CalledProcessError returns bytes for our invocations, the fix that
decoded bytes of stdout was purely to make the mocked test happy while
breaking the actual usage. Restore the behavior and fix the wrong mocked
data.
2021-11-30 22:54:14 +01:00
cd585f4be2 chore(keyringctl): increase test coverage and fix trust expectations 2021-11-30 22:54:14 +01:00
86eb172ac3 chore(keyringctl): add missing type annotations for tests 2021-11-30 22:54:14 +01:00
a21e6f21fb Write bytes to stderr when raising during system call
libkeyringctl/util.py:
Change `system()` to write bytes to stderr.buffer, as before
CalledProcessError.stdout had been used, which returns a string.
2021-11-30 22:54:13 +01:00
8ba7dc1dc9 feature(keyringctl): acquire trust status from key assumptions
Rework the whole trust handling by acquiring the trust status from
actual assumptions related to the amount of ownertrust signatures and
revocations.
2021-11-30 22:54:13 +01:00
26c7027660 feature(keyringctl): support importing from a piped fd
This feature allows to import from a piped fd like:
> ./keyringctl import --name foobar <(gpg --export foo@bar)

We achieve this even with hidepid by taking the naive approach of
copying the processes fd source to a tempfile and pass around latter.
2021-11-30 22:54:13 +01:00
9733fbafd8 feature(keyringctl): add verify command to check certificate expectation
This command checks certain expectations using sq and hokey, prints the
results to stdout and potentially exists non successfully.
2021-11-30 22:54:12 +01:00
58307c629d chore(keyringctl): modularize the code for overview and testing 2021-11-30 22:54:12 +01:00