]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Require Python 3.6 for EdDSA.
authorBrian Wellington <bwelling@xbill.org>
Wed, 11 Mar 2020 16:51:57 +0000 (09:51 -0700)
committerBrian Wellington <bwelling@xbill.org>
Wed, 11 Mar 2020 16:51:57 +0000 (09:51 -0700)
dns/dnssec.py
doc/dnssec.rst
doc/installation.rst

index 1bc840c5513949a8a569942410fe46da7f13f9ee..0cabb5b56edde9f41fd479a8a1d1018d98b18b5d 100644 (file)
@@ -20,6 +20,7 @@
 import hashlib  # used in make_ds() to avoid pycrypto dependency
 from io import BytesIO
 import struct
+import sys
 import time
 
 import dns.exception
@@ -387,8 +388,8 @@ def _validate_rrsig(rrset, rrsig, keys, origin=None, now=None):
 
         elif _is_eddsa(rrsig.algorithm):
             keyptr = candidate_key.key
-            if not _have_ecpy:
-                raise ImportError('DNSSEC validation for algorithm %u requires ecpy library' % rrsig.algorithm)
+            if not (_have_ecpy and sys.version_info >= (3, 6)):
+                raise ImportError('DNSSEC validation for algorithm %u requires ecpy library and Python 3.6 or newer' % rrsig.algorithm)
             if rrsig.algorithm == ED25519:
                 curve = 'Ed25519'
             else:
index 81abc311828929eb0a3274c1f57ac5db11b60f50..ddc3a8315aef319bb259abe399bfc89ef9a71933 100644 (file)
@@ -7,7 +7,8 @@ DNSSEC
 Dnspython can do simple DNSSEC signature validation, but currently has no
 facilities for signing.  In order to use DNSSEC functions, you must have
 ``pycryptodome`` or ``pycryptodomex`` installed.  In order to use the EdDSA
-algorithms, you must also have ``ecpy`` installed.
+algorithms, you must also be running Python 3.6 or later and have
+``ecpy`` installed.
 
 DNSSEC Functions
 ----------------
index 63f29ff0a0fb21809779182f69914936a49e053f..d4b2e2fba6aaf9daa0384cb1131bb0f73451027f 100644 (file)
@@ -48,7 +48,7 @@ The following modules are optional, but recommended for full functionality.
 If ``pycryptodome`` / ``pycryptodomex`` is installed, then dnspython will be
 able to do low-level DNSSEC RSA, DSA, and ECDSA signature validation.
 
-If ``ecpy`` is installed as well, then dnspython will be able to do low-level
-EdDSA signature verification.
+If using Python 3.6 or later and ``ecpy`` is installed as well, then dnspython
+will be able to do low-level EdDSA signature verification.
 
 If ``idna`` is installed, then IDNA 2008 will be available.