https://git.schokokeks.org/derivepassphrase.git/tree/aacd09bdcbdb01df7cb819396727d2427636b144 Recent commits to derivepassphrase.git (aacd09bdcbdb01df7cb819396727d2427636b144) 2024-09-01T11:08:47+02:00 tag:gitlist.org,2012:commit/aacd09bdcbdb01df7cb819396727d2427636b144 Merge topic branch 'issue9-allow-all-unicode-passphrases' into master 2024-09-01T11:08:47+02:00 Marco Ricci m@the13thletter.info <pre>* t/issue9-allow-all-unicode-passphrases: Allow all textual strings, but warn on unnormalized ones GitHub: Closes #9. &lt;/pre&gt; tag:gitlist.org,2012:commit/b4d8439fa4207b665ad8ea2217f21f807f603734 Merge topic branch 'issue1-vault-config-exporter' into master 2024-09-01T11:06:43+02:00 Marco Ricci m@the13thletter.info <pre>* t/issue1-vault-config-exporter: Fix formatting and linting issues in exporter tests Add Changelog entry for the vault exporter Rename vault v0.2/v0.3 classes, and fix API weirdnesses and test coverage Add more tests of the storeroom format exporter's internals Test exporter data loading functionality more robustly Move exporter command-line interface into a separate module Add preliminary tests for the exporter Add command-line interface to the exporter Move vault key and path detection logic into the exporter module Add prototype for "vault v0.2/v0.3"-type data export Support exports from outside the current directory Add dependency on cryptography for the exporter Add an actual storeroom exporter, not just a reader Add docstrings and better variable names on storeroom exporter Add example for "storeroom"-type data export Add prototype for "storeroom"-type data export GitHub: Closes #1. &lt;/pre&gt; tag:gitlist.org,2012:commit/fb6913b190365893f3d5e83225a496c9061c6e54 Fix formatting and linting issues in exporter tests 2024-09-01T11:05:14+02:00 Marco Ricci m@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/94068756e896574a397b4717388b02ed661a22a9 Allow all textual strings, but warn on unnormalized ones 2024-09-01T00:32:49+02:00 Marco Ricci m@the13thletter.info <pre>Remove the "check if Unicode string has unambiguous byte encoding" misfeature, which is based on an incorrect understanding of Unicode normalization forms. Also remove the `AmbiguousByteRepresentationError` class. Now we allow all textual strings as master passphrases. When storing a (master) passphrase to the configuration or when interactively generating a passphrase, we emit a warning if we detect that the master passphrase is not normalized (with the configured normalization form, stored in `.global.unicode_normalization_form`). &lt;/pre&gt; tag:gitlist.org,2012:commit/5022fff219bf1bc30988d3070e564ad058f0d5c4 Add Changelog entry for the vault exporter 2024-08-31T22:09:41+02:00 Marco Ricci m@the13thletter.info <pre>&lt;/pre&gt; tag:gitlist.org,2012:commit/0169d5fbbb766fef119548e8b07cd0e2bcd43ac6 Rename vault v0.2/v0.3 classes, and fix API weirdnesses and test coverage 2024-08-31T21:26:49+02:00 Marco Ricci m@the13thletter.info <pre>The `Reader` classes are now named `VaultNativeConfigParser`, because `Reader` is a very non-descript name. The interface is now somewhat more pythonic, and uses fewer internal branches. Further tests of the internals have been added, so the module has 100% test coverage. &lt;/pre&gt; tag:gitlist.org,2012:commit/349f20ebdbc4c3bd4e4fc9e8454dc10b5d081396 Add more tests of the storeroom format exporter's internals 2024-08-31T21:24:29+02:00 Marco Ricci m@the13thletter.info <pre>Further tests are necessary to achieve 100% coverage, but these concern the detection of format errors, so the test files are rather hard to generate. &lt;/pre&gt; tag:gitlist.org,2012:commit/fa6125de4455fb187db8888e510400e9e9820b3b Test exporter data loading functionality more robustly 2024-08-31T21:04:32+02:00 Marco Ricci m@the13thletter.info <pre>Move the `_load_data` function, which deals with determining the correct vault storage format (with automatic rollover) into the top level, where the function can be tested in isolation, and stubbed out if necessary. Also, use the environments with disabled cryptography support to test for correct failure behavior of the exporter. Use `importlib.util.find_spec` instead of an `import` statement to check for importability of a module, which does not require handling of `ModuleNotFoundError` if restricted to top-level modules/packages. &lt;/pre&gt; tag:gitlist.org,2012:commit/0be132367e57855736c2c4163dd6c606f2b88d23 Move exporter command-line interface into a separate module 2024-08-31T13:32:33+02:00 Marco Ricci m@the13thletter.info <pre>Also replicate this module structure in the tests, which allows us to use `pytest.importorskip` to deal with missing `cryptography` support. &lt;/pre&gt; tag:gitlist.org,2012:commit/fa1083e98907a6a7dc48e8decfa7146708510341 Add preliminary tests for the exporter 2024-08-25T23:50:03+02:00 Marco Ricci m@the13thletter.info <pre>Includes basic testing of command-line functionality, explicit examples of each supported format, and proper hatch environment and dependency selection (with exporter support, or without) to run tests in. The major missing pieces are weird-to-reach error conditions in the internals of the exporter functions (which require invasive mocking) and explicit API testing of the exporter functions (i.e. beyond each exporter's "main" function). Because the internal API is not yet stable, particularly the v0.2 and v0.3 exporters, this is currently left as a TODO. Since we are attempting to support installations without the cryptography module, we must ensure the exporter modules all stay importable without triggering import errors. (This is also relevant for pytest's test collection phase, where those modules too are scanned for doctests.) Currently we stub out each (sub-)module of the cryptography package implicitly, such that calling any method on the stub raises an import error, as well as explicitly through a `STUBBED` attribute on the exporter module. &lt;/pre&gt;