pynacl should be a fix dependency

Bug #1854475 reported by lukn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkimpy
Fix Released
Wishlist
Scott Kitterman

Bug Description

  File "/whatever/is/my/funny/project.py", line xxx, in functionname
    valid = d.verify()
  File "/usr/lib/python3.6/site-packages/dkim/__init__.py", line 879, in verify
    return self.verify_sig(sig, include_headers, sigheaders[idx], dnsfunc)
  File "/usr/lib/python3.6/site-packages/dkim/__init__.py", line 674, in verify_sig
    pk, self.keysize, ktag = load_pk_from_dns(name, dnsfunc)
  File "/usr/lib/python3.6/site-packages/dkim/__init__.py", line 440, in load_pk_from_dns
    pk = nacl.signing.VerifyKey(pub[b'p'], encoder=nacl.encoding.Base64Encoder)
NameError: name 'nacl' is not defined

with more and more dkim users publishing elliptic curve keys it would be reasonable to add pynacl as a required dependency. Additionally, pynacl requires cffi as backend.

Revision history for this message
Scott Kitterman (kitterman) wrote :

I'm not sure I agree, particularly since adding something that needs to be compiled when installed via pip adds a lot of complexity. We should definitely have a better error message here though.

Changed in dkimpy:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Scott Kitterman (kitterman) wrote :

Changes to make the error clearer committed. While I would encourage distributions to make pynacl a dependency (I did in the Debian package), I don't think it's appropriate for installs from pypi.

Changed in dkimpy:
assignee: nobody → Scott Kitterman (kitterman)
milestone: none → 1.0.1
status: Triaged → Fix Committed
Revision history for this message
Scott Kitterman (kitterman) wrote :

2019-12-15 Version 1.0.1
    - Follow CNAMES when looking up key records when using DNS (pydns)
      (LP: #1856421)
    - Provide specialized error message when signing or verifying ed25519
      signatures and pynacl is not installed (LP: #1854475)

Changed in dkimpy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.