unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob bf41ec865cdf1f035bc950eec4bfba429315673f 1225 bytes (raw)
name: gnu/packages/patches/python-asyncssh-2.2.1-no-crypto2.8.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
Reverted commit
https://github.com/ronf/asyncssh/commit/386432c9b698beb23ccb88b69f4023560b76750f

--- b/asyncssh/crypto/chacha.py
+++ a/asyncssh/crypto/chacha.py
@@ -51,13 +51,18 @@
     def poly1305(key, data, nonce):
         """Compute a Poly1305 tag for a block of data"""
 
+        poly = Poly1305(poly1305_key(key, nonce))
+        poly.update(data)
+        return poly.finalize()
-        return Poly1305.generate_tag(poly1305_key(key, nonce), data)
 
     def poly1305_verify(key, data, nonce, tag):
         """Verify a Poly1305 tag for a block of data"""
 
+        poly = Poly1305(poly1305_key(key, nonce))
+
         try:
+            poly.update(data)
+            poly.verify(tag)
-            Poly1305.verify_tag(poly1305_key(key, nonce), data, tag)
             return True
         except InvalidSignature:
             return False
--- b/setup.py
+++ a/setup.py
@@ -52,7 +52,7 @@
       long_description = long_description,
       platforms = 'Any',
       python_requires = '>= 3.6',
+      install_requires = ['cryptography >= 2.7'],
-      install_requires = ['cryptography >= 2.8'],
       extras_require = {
           'bcrypt':     ['bcrypt >= 3.1.3'],
           'gssapi':     ['gssapi >= 1.2.0'],

debug log:

solving bf41ec865c ...
found bf41ec865c in https://yhetil.org/guix-patches/20200428094458.GC3395@zpidnp36/

applying [1/1] https://yhetil.org/guix-patches/20200428094458.GC3395@zpidnp36/
diff --git a/gnu/packages/patches/python-asyncssh-2.2.1-no-crypto2.8.patch b/gnu/packages/patches/python-asyncssh-2.2.1-no-crypto2.8.patch
new file mode 100644
index 0000000000..bf41ec865c

1:15: trailing whitespace.
 
1:20: trailing whitespace.
 
1:23: trailing whitespace.
 
Checking patch gnu/packages/patches/python-asyncssh-2.2.1-no-crypto2.8.patch...
Applied patch gnu/packages/patches/python-asyncssh-2.2.1-no-crypto2.8.patch cleanly.
warning: 3 lines add whitespace errors.

index at:
100644 bf41ec865cdf1f035bc950eec4bfba429315673f	gnu/packages/patches/python-asyncssh-2.2.1-no-crypto2.8.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).