python/python-axolotl-curve25519: Updated for version 0.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
b0fe1b7c76
commit
f96f9a9a8e
|
@ -0,0 +1,43 @@
|
|||
From 2bd1f5556fed92afb4efc2a95846a1c0f8332baf Mon Sep 17 00:00:00 2001
|
||||
From: Josue Ortega <josueortega@debian.org.gt>
|
||||
Date: Sun, 15 Feb 2015 15:28:36 -0600
|
||||
Subject: [PATCH] Fixed prototype definition
|
||||
|
||||
---
|
||||
curve/ed25519/additions/zeroize.c | 4 ++--
|
||||
curve/ed25519/additions/zeroize.h | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/curve/ed25519/additions/zeroize.c b/curve/ed25519/additions/zeroize.c
|
||||
index 37c1f70..be4a8e3 100644
|
||||
--- a/curve/ed25519/additions/zeroize.c
|
||||
+++ b/curve/ed25519/additions/zeroize.c
|
||||
@@ -3,14 +3,14 @@
|
||||
void zeroize(unsigned char* b, size_t len)
|
||||
{
|
||||
size_t count = 0;
|
||||
- unsigned long retval = 0;
|
||||
+ //unsigned long retval = 0;
|
||||
volatile unsigned char *p = b;
|
||||
|
||||
for (count = 0; count < len; count++)
|
||||
p[count] = 0;
|
||||
}
|
||||
|
||||
-void zeroize_stack()
|
||||
+void zeroize_stack(void)
|
||||
{
|
||||
unsigned char m[ZEROIZE_STACK_SIZE];
|
||||
zeroize(m, sizeof m);
|
||||
diff --git a/curve/ed25519/additions/zeroize.h b/curve/ed25519/additions/zeroize.h
|
||||
index 80fcffb..7949924 100644
|
||||
--- a/curve/ed25519/additions/zeroize.h
|
||||
+++ b/curve/ed25519/additions/zeroize.h
|
||||
@@ -7,6 +7,6 @@
|
||||
|
||||
void zeroize(unsigned char* b, size_t len);
|
||||
|
||||
-void zeroize_stack();
|
||||
+void zeroize_stack(void);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,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
|
|
@ -0,0 +1,22 @@
|
|||
From e31fe347051e8dd051514398c56a816a3a71f8a4 Mon Sep 17 00:00:00 2001
|
||||
From: Josue Ortega <josueortega@debian.org.gt>
|
||||
Date: Sun, 15 Feb 2015 15:27:54 -0600
|
||||
Subject: [PATCH] Removed unused variable
|
||||
|
||||
---
|
||||
curve/ed25519/additions/curve_sigs.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/curve/ed25519/additions/curve_sigs.c b/curve/ed25519/additions/curve_sigs.c
|
||||
index 51f2052..fa78eaf 100644
|
||||
--- a/curve/ed25519/additions/curve_sigs.c
|
||||
+++ b/curve/ed25519/additions/curve_sigs.c
|
||||
@@ -7,7 +7,7 @@ void curve25519_keygen(unsigned char* curve25519_pubkey_out,
|
||||
const unsigned char* curve25519_privkey_in)
|
||||
{
|
||||
ge_p3 ed; /* Ed25519 pubkey point */
|
||||
- fe ed_y, ed_y_plus_one, one_minus_ed_y, inv_one_minus_ed_y;
|
||||
+ fe ed_y_plus_one, one_minus_ed_y, inv_one_minus_ed_y;
|
||||
fe mont_x;
|
||||
|
||||
/* Perform a fixed-base multiplication of the Edwards base point,
|
|
@ -23,8 +23,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=python-axolotl-curve25519
|
||||
GITREV=${GITREV:-e4a9c4de0eae27223200579c58d1f8f6d20637e2}
|
||||
VERSION=${VERSION:-git$(echo "$GITREV" | sed 's/^\(.\{7\}\).*$/\1/')}
|
||||
VERSION=${VERSION:-0.1}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
|
@ -60,9 +59,14 @@ set -e
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$GITREV
|
||||
tar xvf $CWD/$PRGNAM-$GITREV.tar.gz
|
||||
cd $PRGNAM-$GITREV
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
|
||||
for sha1 in e31fe347051e8dd051514398c56a816a3a71f8a4 2bd1f5556fed92afb4efc2a95846a1c0f8332baf 87303fb7cffc99c13895c9888b270b740a7245d0 ; do
|
||||
patch -p1 < "$CWD/patches/$sha1.patch"
|
||||
done
|
||||
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
|
@ -81,7 +85,6 @@ find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | gr
|
|||
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README.md $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
PRGNAM="python-axolotl-curve25519"
|
||||
VERSION="gite4a9c4d"
|
||||
VERSION="0.1"
|
||||
HOMEPAGE="https://github.com/tgalal/python-axolotl-curve25519"
|
||||
DOWNLOAD="https://github.com/tgalal/python-axolotl-curve25519/archive/e4a9c4de0eae27223200579c58d1f8f6d20637e2/python-axolotl-curve25519-e4a9c4de0eae27223200579c58d1f8f6d20637e2.tar.gz"
|
||||
MD5SUM="44bc4d9bd172653781bf07ad4288cba2"
|
||||
DOWNLOAD="https://pypi.python.org/packages/69/e0/9605cac4c83c12d0bef5c2e9992f0bcbce4fae9a252899d545ccb7dc8717/python-axolotl-curve25519-0.1.tar.gz"
|
||||
MD5SUM="f28d902df9044f0bf86a35a4bd2ec092"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
|
|
Loading…
Reference in New Issue