svn commit: r503350 - in head/security: . py-argon2-cffi py-argon2-cffi/files
Kubilay Kocak
koobs at FreeBSD.org
Mon Jun 3 05:23:29 UTC 2019
Author: koobs
Date: Mon Jun 3 05:23:26 2019
New Revision: 503350
URL: https://svnweb.freebsd.org/changeset/ports/503350
Log:
[NEW] security/py-argon2-cffi: Secure Argon2 password hashing algorithm
Argon2 won the Password Hashing Competition and argon2_cffi is the simplest
way to use it in Python and PyPy:
passlib 1.7.0 and later offers Argon2 support using this library too.
WWW: https://argon2-cffi.readthedocs.io/
Added:
head/security/py-argon2-cffi/
head/security/py-argon2-cffi/Makefile (contents, props changed)
head/security/py-argon2-cffi/distinfo (contents, props changed)
head/security/py-argon2-cffi/files/
head/security/py-argon2-cffi/files/patch-tests_test__low__level.py (contents, props changed)
head/security/py-argon2-cffi/pkg-descr (contents, props changed)
Modified:
head/security/Makefile
Modified: head/security/Makefile
==============================================================================
--- head/security/Makefile Mon Jun 3 05:02:52 2019 (r503349)
+++ head/security/Makefile Mon Jun 3 05:23:26 2019 (r503350)
@@ -854,6 +854,7 @@
SUBDIR += py-YubiOTP
SUBDIR += py-acme
SUBDIR += py-acme-tiny
+ SUBDIR += py-argon2-cffi
SUBDIR += py-artifacts
SUBDIR += py-asyncssh
SUBDIR += py-backports.ssl_match_hostname
Added: head/security/py-argon2-cffi/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/py-argon2-cffi/Makefile Mon Jun 3 05:23:26 2019 (r503350)
@@ -0,0 +1,43 @@
+# $FreeBSD$
+
+PORTNAME= argon2-cffi
+PORTVERSION= 19.1.0
+CATEGORIES= security python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME:S/-/_/}-${PORTVERSION}
+
+MAINTAINER= koobs at FreeBSD.org
+COMMENT= Secure Argon2 password hashing algorithm
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0.0:devel/py-cffi@${PY_FLAVOR}
+LIB_DEPENDS= libargon2.so:security/libargon2
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.0.0:devel/py-cffi@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}six>0:devel/py-six@${PY_FLAVOR}
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}hypothesis>0:devel/py-hypothesis@${PY_FLAVOR}
+
+USES= python localbase
+USE_PYTHON= autoplist distutils
+
+MAKE_ENV+= ARGON2_CFFI_USE_SYSTEM=1
+
+PYDISTUTILS_BUILD_TARGET= build_ext
+PYDISTUTILS_BUILDARGS+= --inplace
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/argon2/*.so
+
+do-test:
+ @cd ${WRKSRC} && PYTHONPATH=src ${PYTHON_CMD} -m pytest -v -rs
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_VER} < 3.4
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>
Added: head/security/py-argon2-cffi/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/py-argon2-cffi/distinfo Mon Jun 3 05:23:26 2019 (r503350)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1559532624
+SHA256 (argon2_cffi-19.1.0.tar.gz) = 81548a27b919861040cb928a350733f4f9455dd67c7d1ba92eb5960a1d7f8b26
+SIZE (argon2_cffi-19.1.0.tar.gz) = 1808120
Added: head/security/py-argon2-cffi/files/patch-tests_test__low__level.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/py-argon2-cffi/files/patch-tests_test__low__level.py Mon Jun 3 05:23:26 2019 (r503350)
@@ -0,0 +1,22 @@
+# Disable deadline on test_argument_ranges
+# https://github.com/hynek/argon2_cffi/pull/52
+
+--- tests/test_low_level.py.orig 2018-06-17 05:51:36 UTC
++++ tests/test_low_level.py
+@@ -5,7 +5,7 @@ import os
+
+ import pytest
+
+-from hypothesis import assume, given
++from hypothesis import assume, given, settings
+ from hypothesis import strategies as st
+
+ from argon2.exceptions import (
+@@ -253,6 +253,7 @@ class TestVerify(object):
+ hash_len=st.integers(lib.ARGON2_MIN_OUTLEN, 513),
+ salt_len=st.integers(lib.ARGON2_MIN_SALT_LENGTH, 513),
+ )
++ at settings(deadline=None)
+ def test_argument_ranges(
+ password, time_cost, parallelism, memory_cost, hash_len, salt_len
+ ):
Added: head/security/py-argon2-cffi/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/py-argon2-cffi/pkg-descr Mon Jun 3 05:23:26 2019 (r503350)
@@ -0,0 +1,6 @@
+Argon2 won the Password Hashing Competition and argon2_cffi is the simplest
+way to use it in Python and PyPy:
+
+passlib 1.7.0 and later offers Argon2 support using this library too.
+
+WWW: https://argon2-cffi.readthedocs.io/
More information about the svn-ports-all
mailing list