* Use dns.resolver.resolve instead of dns.resolver.query
due to deprecation
* Treat dns.resolver.NoNameservers like NXDOMAIN (not an
error)
* Confine errors from dnspython to dnsplug and use dkim
errors, since dkim.__init__.py doesn't import dns and
needs dkim errors
* Catch nacl.exceptions.ValueError and raise
KeyFormatError, similar to how RSA key errors are treated
* Create ed25519 key files with secure permissions to
avoid risk of insecure chmode call/race condition
* Properly cleanup temporary directories in tests
* Verify correct AMS header is used for ARC seal
verification (André Cruz)
* Document dropping of Python 2 support
* Fix traceback when attempting to verify an unsigned
message using async verify
* Add domain validity check for ascii domains (no
specials)
* Add option to specify index number of signature to
verify to dkimverify
* Correct signature indexing error introduced in 1.0.0
that prevents verification of multiple signatures in a
single message
* Correct dkim.verify processing to avoid errors when
verifying messages with no DKIM signatures
* Update dnsplug for DNS Python (dns) 2.0 compatibility
* Provide more specific error message when ed25519
private key is invalid
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dkimpy?expand=0&rev=11
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
Index: dkimpy-1.1.5/dkim/__init__.py
|
|
===================================================================
|
|
--- dkimpy-1.1.5.orig/dkim/__init__.py
|
|
+++ dkimpy-1.1.5/dkim/__init__.py
|
|
@@ -43,18 +43,9 @@ import binascii
|
|
# Set to False to not use async functions even though aiodns is installed.
|
|
USE_ASYNC = True
|
|
|
|
-# only needed for arc
|
|
-try:
|
|
- import authres
|
|
-except ImportError:
|
|
- pass
|
|
-
|
|
-# only needed for ed25519 signing/verification
|
|
-try:
|
|
- import nacl.signing
|
|
- import nacl.encoding
|
|
-except ImportError:
|
|
- pass
|
|
+import authres
|
|
+import nacl.signing
|
|
+import nacl.encoding
|
|
|
|
from dkim.canonicalization import (
|
|
CanonicalizationPolicy,
|
|
@@ -1181,7 +1172,7 @@ class ARC(DomainSigner):
|
|
if chain_validation_status == CV_Fail:
|
|
self.headers.reverse()
|
|
if b'h' in as_fields:
|
|
- raise ValidationError("h= tag not permitted in ARC-Seal header field")
|
|
+ raise ValidationError("h= tag not permitted in ARC-Seal header field")
|
|
res = self.gen_header(as_fields, as_include_headers, canon_policy,
|
|
b"ARC-Seal", pk, standardize)
|
|
|