From owner-svn-ports-all@freebsd.org Mon Jun 3 05:23:28 2019 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B47415A4167; Mon, 3 Jun 2019 05:23:28 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37ADA8EBD5; Mon, 3 Jun 2019 05:23:28 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 27C0419E5; Mon, 3 Jun 2019 05:23:28 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x535NSiJ054776; Mon, 3 Jun 2019 05:23:28 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x535NRWn054771; Mon, 3 Jun 2019 05:23:27 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201906030523.x535NRWn054771@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Mon, 3 Jun 2019 05:23:27 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r503350 - in head/security: . py-argon2-cffi py-argon2-cffi/files X-SVN-Group: ports-head X-SVN-Commit-Author: koobs X-SVN-Commit-Paths: in head/security: . py-argon2-cffi py-argon2-cffi/files X-SVN-Commit-Revision: 503350 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 37ADA8EBD5 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jun 2019 05:23:29 -0000 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@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 + +.if ${PYTHON_VER} < 3.4 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}enum34>0:devel/py-enum34@${PY_FLAVOR} +.endif + +.include 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), + ) ++@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/