development/pycrypto: Updated for version 2.1.0
This commit is contained in:
parent
e296adf8af
commit
a1c867b808
|
@ -1,3 +1,3 @@
|
|||
This is a collection of both secure hash functions (such as MD5 and SHA),
|
||||
and various encryption algorithms (AES, DES, IDEA, RSA, ElGamal, etc.).
|
||||
The package is structured to make adding new modules easy.
|
||||
The package is structured to make adding new modules easy.
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
diff -p -up pycrypto-2.0.1/src/ARC2.c.orig pycrypto-2.0.1/src/ARC2.c
|
||||
--- pycrypto-2.0.1/src/ARC2.c.orig 2002-05-17 10:34:45.000000000 -0300
|
||||
+++ pycrypto-2.0.1/src/ARC2.c 2009-02-20 13:50:28.000000000 -0300
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
+#include "Python.h"
|
||||
|
||||
#define MODULE_NAME ARC2
|
||||
#define BLOCK_SIZE 8
|
||||
@@ -146,6 +147,12 @@ block_init(block_state *self, U8 *key, i
|
||||
We'll hardwire it to 1024. */
|
||||
#define bits 1024
|
||||
|
||||
+ if ((U32)keylength > sizeof(self->xkey)) {
|
||||
+ PyErr_SetString(PyExc_ValueError,
|
||||
+ "ARC2 key length must be less than 128 bytes");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
memcpy(self->xkey, key, keylength);
|
||||
|
||||
/* Phase 1: Expand input key to 128 bytes */
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Slackware build script for pycrypto
|
||||
|
||||
# Copyright 2008-2009 Heinz Wiesinger <pprkut@liwjatan.at>
|
||||
# Copyright 2008-2010 Heinz Wiesinger, Amsterdam, The Netherlands
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
|
@ -23,9 +23,9 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=pycrypto
|
||||
VERSION=2.0.1
|
||||
VERSION=2.1.0
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-2}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
CWD=$(pwd)
|
||||
|
@ -33,14 +33,6 @@ TMP=${TMP:-/tmp/SBo}
|
|||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
|
@ -56,16 +48,13 @@ find . \
|
|||
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
||||
-exec chmod 644 {} \;
|
||||
|
||||
# Fixes buffer overflow in the PyCrypto ARC2 module
|
||||
patch -p1 -i $CWD/pycrypto-CVE-2009-0544.patch
|
||||
|
||||
python setup.py install --root=$PKG
|
||||
|
||||
find $PKG | xargs file | grep "shared object" | grep ELF | \
|
||||
cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a ACKS ChangeLog LICENSE MANIFEST PKG-INFO README TODO Doc \
|
||||
cp -a ACKS ChangeLog COPYRIGHT README TODO Doc \
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
|
@ -73,4 +62,4 @@ mkdir -p $PKG/install
|
|||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
PRGNAM="pycrypto"
|
||||
VERSION="2.0.1"
|
||||
HOMEPAGE="http://www.amk.ca/python/code/crypto.html"
|
||||
DOWNLOAD="http://www.amk.ca/files/python/crypto/pycrypto-2.0.1.tar.gz"
|
||||
MD5SUM="4d5674f3898a573691ffb335e8d749cd"
|
||||
MAINTAINER="ppr:kut"
|
||||
VERSION="2.1.0"
|
||||
HOMEPAGE="http://www.pycrypto.org"
|
||||
DOWNLOAD="http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.1.0.tar.gz"
|
||||
MD5SUM="1d3eb04f06e6f09a080bc37fb019f9bf"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
MAINTAINER="Heinz Wiesinger"
|
||||
EMAIL="pprkut@liwjatan.at"
|
||||
APPROVED="dsomero"
|
||||
APPROVED="Erik Hanson"
|
||||
|
||||
|
|
Loading…
Reference in New Issue