Skip to content

ed25519 tests, perf test fix, dkim_free() memory leak, dkim_sig_keybits()#243

Closed
jcastle-gh wants to merge 1 commit into
trusteddomainproject:developfrom
jcastle-gh:ed25519-tests
Closed

ed25519 tests, perf test fix, dkim_free() memory leak, dkim_sig_keybits()#243
jcastle-gh wants to merge 1 commit into
trusteddomainproject:developfrom
jcastle-gh:ed25519-tests

Conversation

@jcastle-gh
Copy link
Copy Markdown

Add 4 ed25519 directed tests and 2 ed25519 performance test scripts. In the Makefile t-cleanup is not part of $check_PROGRAMS anymore so that it can can be run after the $check_SCRIPTS tests instead of before them, allowing those tests to use the keyfile that t-cleanup deletes.

Also fix 3 bugs found while doing the above.

  1. The t-signperf and t-verifyperf performance tests were blindly looping on sign and verify operations without checking for correct results. They always reported "pass" even when the operation failed, for example when the key was not found. Now they assert the results and "fail" if something goes wrong.

  2. In dkim_free() the ed25519 crypto structure wasn't getting freed.

  3. In dkim_sig_keybits() the wrong size was being returned for ed25519. For now, always return 256 since ed25519 is always 256-bit. The underlying bug is in the calculation of 'keybits' in various other dkim functions and that will be fixed in a subesquent PR.

…ts()

Add 4 ed25519 directed tests and 2 ed25519 performance test scripts. In
the Makefile t-cleanup is not part of $check_PROGRAMS anymore so that it
can can be run after the $check_SCRIPTS tests instead of before them,
allowing those tests to use the keyfile that t-cleanup deletes.

Also fix 3 bugs found while doing the above.

1. The t-signperf and t-verifyperf performance tests were blindly
   looping on sign and verify operations without checking for correct
   results. They always reported "pass" even when the operation failed,
   for example when the key was not found. Now they assert the results
   and "fail" if something goes wrong.

2. In dkim_free() the ed25519 crypto structure wasn't getting freed.

3. In dkim_sig_keybits() the wrong size was being returned for ed25519.
   For now, always return 256 since ed25519 is always 256-bit.  The
   underlying bug is in the calculation of 'keybits' in various other
   dkim functions and that will be fixed in a subesquent PR.
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
…-tests

libopendkim: fix memory leak at dkim_free() for ed25519 keys
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
…-tests

libopendkim: fix dkim_sig_keybits() for ed25519 keys
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
…-tests

libopendkim/tests: Make sure to execute t-cleanup after tests.
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
…-tests

Add 4 ed25519 directed tests and 2 ed25519 performance test scripts.
futatuki added a commit to futatuki/OpenDKIM that referenced this pull request Apr 24, 2026
@thegushi
Copy link
Copy Markdown
Collaborator

Superseded by PR #321, which is a clean cherry-pick onto current develop. The only conflict was a trivial Makefile.am hunk (t-test160 added since the original base). All credit for the work remains with @jcastle-gh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants