git: 0421e03a23be - main - security/py-pem: Add py-pem 21.2.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 30 Jan 2023 13:04:48 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0421e03a23be9fbec212738a717eb208c7532d02

commit 0421e03a23be9fbec212738a717eb208c7532d02
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-01-30 12:21:12 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-01-30 12:58:48 +0000

    security/py-pem: Add py-pem 21.2.0
    
    pem is an MIT-licensed Python module for parsing and splitting of PEM files,
    i.e. Base64-encoded DER keys and certificates.
    
    It runs on Python 3.7+, has no dependencies, and does not attempt to interpret
    the certificate data in any way.
    
    It's born from the need to load keys, certificates, trust chains, and DH
    parameters from various certificate deployments: some servers (like Apache)
    expect them to be a separate file, others (like nginx) expect them concatenated
    to the server certificate and finally some (like HAProxy) expect key,
    certificate, and chain to be in one file.
    
    Additionally to the vanilla parsing code, pem also contains helpers for Twisted
    that save a lot of boilerplate code.
---
 security/Makefile         |  1 +
 security/py-pem/Makefile  | 19 +++++++++++++++++++
 security/py-pem/distinfo  |  3 +++
 security/py-pem/pkg-descr | 14 ++++++++++++++
 4 files changed, 37 insertions(+)

diff --git a/security/Makefile b/security/Makefile
index 45202cb32f74..cda53cb58d72 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -935,6 +935,7 @@
     SUBDIR += py-pass-git-helper
     SUBDIR += py-passlib
     SUBDIR += py-pbkdf2
+    SUBDIR += py-pem
     SUBDIR += py-pgpdump
     SUBDIR += py-pgpy
     SUBDIR += py-plaso
diff --git a/security/py-pem/Makefile b/security/py-pem/Makefile
new file mode 100644
index 000000000000..83ccb8025800
--- /dev/null
+++ b/security/py-pem/Makefile
@@ -0,0 +1,19 @@
+PORTNAME=	pem
+PORTVERSION=	21.2.0
+CATEGORIES=	security python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Easy PEM file parsing in Python
+WWW=		https://github.com/hynek/pem
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/security/py-pem/distinfo b/security/py-pem/distinfo
new file mode 100644
index 000000000000..d7685ecdd6d0
--- /dev/null
+++ b/security/py-pem/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1674588064
+SHA256 (pem-21.2.0.tar.gz) = c491833b092662626fd58a87375d450637d4ee94996ad9bbbd42593428e93e5a
+SIZE (pem-21.2.0.tar.gz) = 35546
diff --git a/security/py-pem/pkg-descr b/security/py-pem/pkg-descr
new file mode 100644
index 000000000000..c2907038fe7d
--- /dev/null
+++ b/security/py-pem/pkg-descr
@@ -0,0 +1,14 @@
+pem is an MIT-licensed Python module for parsing and splitting of PEM files,
+i.e. Base64-encoded DER keys and certificates.
+
+It runs on Python 3.7+, has no dependencies, and does not attempt to interpret
+the certificate data in any way.
+
+It's born from the need to load keys, certificates, trust chains, and DH
+parameters from various certificate deployments: some servers (like Apache)
+expect them to be a separate file, others (like nginx) expect them concatenated
+to the server certificate and finally some (like HAProxy) expect key,
+certificate, and chain to be in one file.
+
+Additionally to the vanilla parsing code, pem also contains helpers for Twisted
+that save a lot of boilerplate code.