diff --git a/security/Makefile b/security/Makefile index ecd879de4cff..6f01c1435611 100644 --- a/security/Makefile +++ b/security/Makefile @@ -190,6 +190,7 @@ PORTREVISION= 1 SUBDIR += gonepass SUBDIR += gopass SUBDIR += gorilla + SUBDIR += gost-engine SUBDIR += govpn SUBDIR += gpa SUBDIR += gpgdir diff --git a/security/gost-engine/Makefile b/security/gost-engine/Makefile new file mode 100644 index 000000000000..b0806f53244c --- /dev/null +++ b/security/gost-engine/Makefile @@ -0,0 +1,53 @@ +# Created by: Eugene Grosbein +# $FreeBSD$ + +PORTNAME= gost-engine +DISTVERSION= g20190421 +CATEGORIES= security + +MAINTAINER= eugen@FreeBSD.org +COMMENT= Implementation of the Russian GOST crypto algorithms for OpenSSL + +LICENSE= OpenSSL +LICENSE_FILE= ${WRKSRC}/LICENSE + +BROKEN_SSL= libressl libressl-devel openssl +BROKEN_SSL_REASON_libressl= needs features only available in OpenSSL 1.1.1+ +BROKEN_SSL_REASON_libressl_devel=needs features only available in OpenSSL 1.1.1+ +BROKEN_SSL_REASON_openssl= needs features only available in OpenSSL 1.1.1+ + +USES= cmake ssl + +CMAKE_ARGS+= -DOPENSSL_ROOT_DIR=${OPENSSLBASE} + +USE_GITHUB= yes +GH_ACCOUNT= gost-engine +GH_PROJECT= engine +GH_TAGNAME= 7ed64cd + +SUB_FILES= pkg-message + +OPTIONS_DEFINE= DOCS + +.include + +.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1200085 +BROKEN_SSL+= base +BROKEN_SSL_REASON_base= needs features only available in OpenSSL 1.1.1+ +.endif + +post-patch: + ${REINPLACE_CMD} 's/-Werror //' ${WRKSRC}/CMakeLists.txt + +post-install: + ( cd ${STAGEDIR}${PREFIX}/lib/engines-1.1 && ${MV} gost.so libgost.so ) + +post-install-DOCS-off: + ( cd ${STAGEDIR}${PREFIX}/man/man1 && ${RM} gost12sum.1 gostsum.1 ) + +post-install-DOCS-on: + ${MKDIR} ${STAGEDIR}${DOCSDIR} + ( cd ${WRKSRC} && ${INSTALL_MAN} INSTALL.md README.gost README.md \ + ${STAGEDIR}${DOCSDIR} ) + +.include diff --git a/security/gost-engine/distinfo b/security/gost-engine/distinfo new file mode 100644 index 000000000000..d699514ca537 --- /dev/null +++ b/security/gost-engine/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1555911951 +SHA256 (gost-engine-engine-g20190421-7ed64cd_GH0.tar.gz) = 96b54eff8e12e2ea2b3120550b5d5aa79a1bf773d5452622ee5b268f2631eccc +SIZE (gost-engine-engine-g20190421-7ed64cd_GH0.tar.gz) = 494751 diff --git a/security/gost-engine/files/pkg-message.in b/security/gost-engine/files/pkg-message.in new file mode 100644 index 000000000000..9809e321bc77 --- /dev/null +++ b/security/gost-engine/files/pkg-message.in @@ -0,0 +1,6 @@ +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +You should edit openssl.cnf configuration file as specified below +to start using GOST Engine through OpenSSL. +For details, refer to the section `How to Configure' in +%%DOCSDIR%%/INSTALL.md +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/security/gost-engine/pkg-descr b/security/gost-engine/pkg-descr new file mode 100644 index 000000000000..ff0a4331e80c --- /dev/null +++ b/security/gost-engine/pkg-descr @@ -0,0 +1,9 @@ +OPENSSL GOST ENGINE +An implementation of Russian cryptography standards for OpenSSL. + +This engine provides an implementation of various Russian cryptographic +algorithms, known generally as GOST cryptographic algorithms. +These algorithms can be used both via OpenSSL command line tools and +via high-level libopenssl calls. + +WWW: https://github.com/gost-engine/engine/blob/master/README.gost diff --git a/security/gost-engine/pkg-plist b/security/gost-engine/pkg-plist new file mode 100644 index 000000000000..92ba69282b95 --- /dev/null +++ b/security/gost-engine/pkg-plist @@ -0,0 +1,8 @@ +bin/gost12sum +bin/gostsum +lib/engines-1.1/libgost.so +%%PORTDOCS%%man/man1/gost12sum.1.gz +%%PORTDOCS%%man/man1/gostsum.1.gz +%%PORTDOCS%%%%DOCSDIR%%/INSTALL.md +%%PORTDOCS%%%%DOCSDIR%%/README.gost +%%PORTDOCS%%%%DOCSDIR%%/README.md