git: fa046e6f5bbb - main - www/libhsts: add port: Library to check a domain against the Chromium HSTS Preload list

From: Dmitry Marakasov <amdmi3_at_FreeBSD.org>
Date: Thu, 18 Nov 2021 11:49:31 UTC
The branch main has been updated by amdmi3:

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

commit fa046e6f5bbb71dd413a1da61a158c079b48c4d4
Author:     Dmitry Marakasov <amdmi3@FreeBSD.org>
AuthorDate: 2021-11-18 00:01:30 +0000
Commit:     Dmitry Marakasov <amdmi3@FreeBSD.org>
CommitDate: 2021-11-18 11:48:16 +0000

    www/libhsts: add port: Library to check a domain against the Chromium HSTS Preload list
    
    The HSTS preload list is a list of domains that support HTTPS. The
    list is compiled by Google and is utilised by Chrome, Firefox and
    others.
    
    With this information, a HTTP client may contact a website without
    trying a plain-text HTTP connection first. It prevents interception
    with redirects that take place over HTTP. None of the sent data
    will ever be unencrypted.
    
    WWW: https://gitlab.com/rockdaboot/libhsts
---
 www/Makefile          |  1 +
 www/libhsts/Makefile  | 19 +++++++++++++++++++
 www/libhsts/distinfo  |  3 +++
 www/libhsts/pkg-descr | 10 ++++++++++
 www/libhsts/pkg-plist |  7 +++++++
 5 files changed, 40 insertions(+)

diff --git a/www/Makefile b/www/Makefile
index 6f4c563ce1f5..c150a8ecab8e 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -292,6 +292,7 @@
     SUBDIR += libecap
     SUBDIR += libepc
     SUBDIR += libevhtp
+    SUBDIR += libhsts
     SUBDIR += libhubbub
     SUBDIR += libjwt
     SUBDIR += libmicrohttpd
diff --git a/www/libhsts/Makefile b/www/libhsts/Makefile
new file mode 100644
index 000000000000..ecc244113c4c
--- /dev/null
+++ b/www/libhsts/Makefile
@@ -0,0 +1,19 @@
+PORTNAME=	libhsts
+PORTVERSION=	0.1.0
+CATEGORIES=	www security
+MASTER_SITES=	https://gitlab.com/rockdaboot/libhsts/uploads/4753f61b5a3c6253acf4934217816e3f/
+
+MAINTAINER=	amdmi3@FreeBSD.org
+COMMENT=	Library to check a domain against the Chromium HSTS Preload list
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		libtool python:build
+GNU_CONFIGURE=	yes
+USE_LDCONFIG=	yes
+INSTALL_TARGET=	install-strip
+CONFIGURE_ARGS=	--disable-doc
+TEST_TARGET=	check
+
+.include <bsd.port.mk>
diff --git a/www/libhsts/distinfo b/www/libhsts/distinfo
new file mode 100644
index 000000000000..e696f8804a32
--- /dev/null
+++ b/www/libhsts/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1637163857
+SHA256 (libhsts-0.1.0.tar.gz) = e1125e0395b4777361eafafd61fff2b516d3f2fb57d56e40cb554a6cd8c024e0
+SIZE (libhsts-0.1.0.tar.gz) = 1579851
diff --git a/www/libhsts/pkg-descr b/www/libhsts/pkg-descr
new file mode 100644
index 000000000000..97dd79e2677a
--- /dev/null
+++ b/www/libhsts/pkg-descr
@@ -0,0 +1,10 @@
+The HSTS preload list is a list of domains that support HTTPS. The
+list is compiled by Google and is utilised by Chrome, Firefox and
+others.
+
+With this information, a HTTP client may contact a website without
+trying a plain-text HTTP connection first. It prevents interception
+with redirects that take place over HTTP. None of the sent data
+will ever be unencrypted.
+
+WWW: https://gitlab.com/rockdaboot/libhsts
diff --git a/www/libhsts/pkg-plist b/www/libhsts/pkg-plist
new file mode 100644
index 000000000000..6d306e7a2855
--- /dev/null
+++ b/www/libhsts/pkg-plist
@@ -0,0 +1,7 @@
+bin/hsts
+include/libhsts.h
+lib/libhsts.a
+lib/libhsts.so
+lib/libhsts.so.0
+lib/libhsts.so.0.0.0
+libdata/pkgconfig/libhsts.pc