Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/test_CLI.py: create $GNUPGHOME on the fly #31

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Jul 16, 2024

  1. tests/test_CLI.py: create $GNUPGHOME on the fly

     - avoid expiration of keys by re-creating them
     - prevent gnupg version being incompatible with $GNUPGHOME in git
    
    Storing binary data is bad because:
    
     - git is not good at handling binary data
     - binary data is harder to inspect (remember the xz incident)
    josch committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    edd5829 View commit details
    Browse the repository at this point in the history
  2. TransRead.read: pass on -1 instead of 0xFFFFFFFFFFFFFFFF

    Passing 0xFFFFFFFFFFFFFFFF to read causes python to complain about:
    
        OverflowError: cannot fit 'int' into an index-sized integer
    
    Signed-off-by: Jörg Sommer <[email protected]>
    jo-so-nx authored and josch committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    48c90d6 View commit details
    Browse the repository at this point in the history
  3. tests: Rework CLI tests

    The current tests do not take into account whether the `gpg` package has
    been installed or not. If it is missing, the tests should be skipped.
    
    Furthermore, the output of the tests must be checked in order to decide
    whether tests fail due to an exception or whether the desired error message
    is displayed.
    
    Signed-off-by: Jörg Sommer <[email protected]>
    jo-so-nx authored and josch committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    4c109dc View commit details
    Browse the repository at this point in the history
  4. CLI: rework PGP verification

    The verification of PGP signatures had some flaws and didn't work, because
    the Python API and the GPG interface have changed. Inline signatures were
    not detected, because of a comparison of string and byte array. And even
    after this the code failed, because `sig.status` is no longer available.
    
    Signed-off-by: Jörg Sommer <[email protected]>
    jo-so-nx authored and josch committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    1244362 View commit details
    Browse the repository at this point in the history