OpenDKIM
OpenDKIM copied to clipboard
force sha256 as sha1 is deprecated anyway
replaces PR #77
There are other supported hashalgs than sha256. Although SHA1 is deprecated, forcing SHA256 will cause issues for some builds and distributions. I feel that this should be configurable. Passing this onto Murray for review.
@martinbogo I wonder, which "other supported hashalgs" you've in mind. I checked the IANA registry that list only sha1 (historic) and sha256 (active)
But it may be possible, other hashalgs are in the "ietf-pipeline" ...
@martinbogo I wonder, which "other supported hashalgs" you've in mind. I checked the IANA registry that list only sha1 (historic) and sha256 (active)
RFC 8463 (which indeed updates RFC6376 you mentioned) specifies ed25519 and at least dkimpy-milter appears to support it.
Forcing SHA256 is not our responsibility. Configuring security by breaking configurations on upgrade is not the way the TDP does things. If the crypto libraries remove SHA1 then we will remove it from TDP. In the meantime, if you want to emit a "stern warning" into the debug output at the "error/warning" level that's about all I'll consider at the moment.
There may be old installations running an old enough OpenSSL library that all they have is SHA1. This PR won't break the filter or the library but it will make "opendkim-genzone" unable to produce something workable for that use case. If the goal is to nudge people toward upgrading, this feels like a weak gesture. I concur with the advice about showing warnings in the face of SHA1 use, except when that's the only algorithm available in which case the warning wouldn't be helpful.
I learned this change would create an incomatible change. We like to avoid breaking changes. OK.
@mskucherawy I've no detailed idea how to determine "SHA1 use, except when that's the only algorithm" which I reword to "SHA1 use if better algorithms are available"?
"h=sha256" in the public keys DNS record is like a policy advise to a validator. It does not require the signer to use "SignatureAlgorithm rsa-sha256" in opendkim.conf. I currently dont see the correlation !? Hints welcome :-)