OpenDKIM
OpenDKIM copied to clipboard
Issue #183: opendkim-testkey: Allow testing ed25519 keys
This is a fix address issue #183, adding support for ed25519 keys to opendkim-testkey.
With PR #202, we can use more than one algorithm/key type in a KeyTable. However as issue #183 says, libopendkim function dkim_test_key() does not support ed25519 keys.
So I add new function dkim_test_key2() , extending dkim_test_key() so that we can pass an algorithm associated with the key, and support ed25519 keys. For the API compatibility, function interface for dkim_test_key() is not changed.
As this PR requires PR #162, #207, and #202, they are already merged in this branch. So new code is only with in the last commit.
Note: It seems this does not work with OpenSSL 1.1.1k (on CentOS 7, openssl11 package installed from EPEL).
It fails with the error below:
opendkim-testkey: key rfc8463._domainkey.example.org: EVP_PKEY_get_raw_public_key
error:060CB096:digital envelope routines:EVP_PKEY_get_raw_public_key:operation not supported for this keytype
Note: It seems this does not work with OpenSSL 1.1.1k (on CentOS 7, openssl11 package installed from EPEL).
It seems even OpenDKIM develop branch head with some patches from PRs, with OpenSSL 1.1.1k cannot handle ed25519 private key PEM files created by OpenSSL 1.1.1k or 3.0.11, 3.0.12. It is not only opendkim-testkey but also opendkim milter, which adds broken signing header with those keys.