summaryrefslogtreecommitdiffstats
path: root/python/python-axolotl-curve25519/patches/87303fb7cffc99c13895c9888b270b740a7245d0.patch
blob: 4e172f7d40a4eba2ab93cc6bfb41b72b4251e2d2 (plain)
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
38
39
40
From 87303fb7cffc99c13895c9888b270b740a7245d0 Mon Sep 17 00:00:00 2001
From: Josue Ortega <josueortega@debian.org.gt>
Date: Sun, 15 Feb 2015 15:29:41 -0600
Subject: [PATCH] Fixed differ in signedness [-Wpointer-sign] warning

---
 curve25519module.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/curve25519module.c b/curve25519module.c
index 4c8ec96..f4bd3d7 100644
--- a/curve25519module.c
+++ b/curve25519module.c
@@ -47,7 +47,8 @@ calculateSignature(PyObject *self, PyObject *args)
         return NULL;
     }
 
-   curve25519_sign(signature, privatekey, message, messagelen, random);
+    curve25519_sign((unsigned char *)signature, (unsigned char *)privatekey, 
+                    (unsigned char *)message, messagelen, (unsigned char *)random);
 
    return PyBytes_FromStringAndSize((char *)signature, 64);
 }
@@ -73,7 +74,8 @@ verifySignature(PyObject *self, PyObject *args)
         return NULL;
     }
 
-    int result = curve25519_verify(signature, publickey, message, messagelen);
+    int result = curve25519_verify((unsigned char *)signature, (unsigned char *)publickey, 
+                                   (unsigned char *)message, messagelen);
 
     return Py_BuildValue("i", result);
 
@@ -173,4 +175,4 @@ curve25519_functions[] = {
         (void)Py_InitModule("axolotl_curve25519", curve25519_functions);
     }
 
-#endif
\ No newline at end of file
+#endif