https://git.schokokeks.org/derivepassphrase.git/tree/65c53d61f985d4c71cfa6a44bcc236d0ac598927 Recent commits to derivepassphrase.git (65c53d61f985d4c71cfa6a44bcc236d0ac598927) 2026-07-05T14:28:33+02:00 tag:gitlist.org,2012:commit/65c53d61f985d4c71cfa6a44bcc236d0ac598927 Work around test runner changes in click > 8.1.8 2026-07-05T14:28:33+02:00 Marco Ricci software@the13thletter.info <pre>More modern versions of click – I believe 8.2.0 and higher, and definitely in 8.4.0 and higher – implement stdout and stderr capture in a completely broken way when prompts are involved and the streams are mixed: mixed streams are not truly interleaved, and prompts cause extra typed-in whitespace from stdin to appear in stderr as well. As a result, the "correct" captured output in a "mixed stdout/stderr" test runner looks neither like an interactive shell session with TTY I/O nor like a non-interactive shell session with redirected I/O; it's a hobgobbled mess of a bit of both. Work around this for now by supplying the correct broken expected output for test runners from newer click versions. But if anything, this reinforces my desire to drop click as a dependency as soon as possible. (See the wishlist item "remove-click" in the 0.6 wishlist. That wish also details *other* API breakage that users have to wrangle with.) &lt;/pre&gt; tag:gitlist.org,2012:commit/0b4f4a9d7947199dd6111b5b9c2fc7cbc9f7e763 Merge branch 'openssh-bug3967-workaround' 2026-06-14T13:20:51+02:00 Marco Ricci software@the13thletter.info <pre>* openssh-bug3967-workaround: Ensure the SSH agent unhappy path/misbehavior tests always run Fix the test setup (SSH agent "query" double-response behavior) Harmonize coverage exclusion markers (and fix one slipup) Reorganize and rename SSH agent mock objects Test our handling of the SSH agent "query" double-response behavior Allow testing for mismatched SSH agent communication Work around double-response for "query" extension from ssh-agent (OpenSSH 10.3) Split SSHAgentClient.request in two Turn the SSH agent protocol message numbers into ints For SSH agent failures, print the raw response text &lt;/pre&gt; tag:gitlist.org,2012:commit/30c0d6f46620b6a96e901c8a886db61b2871e137 Ensure the SSH agent unhappy path/misbehavior tests always run 2026-06-14T10:05:10+02:00 Marco Ricci software@the13thletter.info <pre>The tests for various unhappy paths or misbehavior of the SSH agent now run against the stubbed SSH agent, instead of requiring an external SSH agent (and failing or skipping if that external agent is unavailable). The tests need to intercept all I/O from the agent anyway, so there is little point in requiring to connect to an external agent but then not doing any I/O with the agent. It just introduces another unrelated and unnecessary failure mode (e.g., SSH_AUTH_SOCK not set up). We put the fixture for forcing use of the stubbed SSH agent at the top level of the `ssh_agent` module tests, because that currently seems to be the only place where we need to force use of an internal agent over an external one. &lt;/pre&gt; tag:gitlist.org,2012:commit/c61d17b815f52bf49ce840c00fbaa75db8e11b96 Fix the test setup (SSH agent "query" double-response behavior) 2026-06-14T07:54:14+02:00 Marco Ricci software@the13thletter.info <pre>The test mocks communication aspects of an SSH agent session, and thus needs a running SSH agent. Also, the xfail markers for some of the parametrization values were overly broad, and were masking failures in the test setup because of a missing running SSH agent. &lt;/pre&gt; tag:gitlist.org,2012:commit/6da7a92c3285a1f757cbe7530fe17caf680ad468 Harmonize coverage exclusion markers (and fix one slipup) 2026-06-13T21:28:11+02:00 Marco Ricci software@the13thletter.info <pre>Introduce a second coverage exclusion marker in the form of an overridable session-level fixture `skip_if_no_ctypes_windll_support`, similar to the existing `skip_if_no_af_unix_support` fixture. Also update the description of both fixtures to match their current usage. Also also fix a coverage slipup in a failsafe path of the `AgentProtocolResponseQueue` testing machinery. &lt;/pre&gt; tag:gitlist.org,2012:commit/3430fde355127c4e0951bfaa6f5df63bf82b5f32 Reorganize and rename SSH agent mock objects 2026-06-13T19:22:20+02:00 Marco Ricci software@the13thletter.info <pre>Rename the `Request` and `Response` classes to `AgentProtocolRequest` and `AgentProtocolResponse`, respectively, and move them into the `tests.data` package. Rename the `_RequestResponseIOQueue` class to `AgentProtocolResponseQueue`, and move it into the `tests.machinery` package. Along the way, fix the self-reference of `tests.data` and `tests.machinery` contents within the `tests.machinery` package. &lt;/pre&gt; tag:gitlist.org,2012:commit/2323b5742485ed8ab30c57989a399c491b7484ce Test our handling of the SSH agent "query" double-response behavior 2026-06-13T18:52:55+02:00 Marco Ricci software@the13thletter.info <pre>Add tests to verify that we gracefully react to an SSH agent replying twice to a "query" extension request. &lt;/pre&gt; tag:gitlist.org,2012:commit/0166a2edbd9c81df63e2d9fd5c057212d4ce6b45 Allow testing for mismatched SSH agent communication 2026-06-13T18:52:55+02:00 Marco Ricci software@the13thletter.info <pre>Generalize the mocked SSH agent machinery for simulating error responses slightly, so that instead of passing one-to-one request/response pairs, we pass one-to-many request/list-of-responses pairs. Responses are kept on a queue, and the machinery asserts that the queue is empty at the end of the interaction. This new flexibility is not yet required anywhere, but will be used in the next commit. &lt;/pre&gt; tag:gitlist.org,2012:commit/20bcd8f960b0655700905e9f20f807de15809188 Work around double-response for "query" extension from ssh-agent (OpenSSH 10.3) 2026-06-13T18:52:55+02:00 Marco Ricci software@the13thletter.info <pre>Detect and work around `ssh-agent` (OpenSSH 10.3 only) responding twice when answering a "query" extension request: once with the expected "extension response" or "success" message, and once with an unexpected/additional empty "success" message. We detect the extra empty "success" message in a generic and protocol compliant way, and re-align request-response-pair boundaries for any future requests. From the agent's perspective, the work-around does a read-only operation and should not change any permanent agent state, whether there are extra empty "success" messages or not. As written, the work-around tests specifically for output from OpenSSH 10.3, but is otherwise agnostic to the "extension response" message contents and could be easily adapted to trigger for other content patterns. &lt;/pre&gt; tag:gitlist.org,2012:commit/ea78e13123d1ce64bf4e02c624497ae6c37a6b3f Split SSHAgentClient.request in two 2026-06-13T16:04:08+02:00 Marco Ricci software@the13thletter.info <pre>Factor out the serialization of the request message and the deserialization of the response message from `SSHAgentClient.request` into separate helper methods. `SSHAgentClient.request` now only contains the management of expected response codes, and the raising of errors if unexpected response codes are received. While this refactoring was unnecessary so far – requests and responses were always paired and aligned – the next piece of code I intend to commit requires handling unpaired responses, and will use only one of these helper methods. &lt;/pre&gt;