diff options
author | Yasuhiro Kimura <yasu@FreeBSD.org> | 2024-03-13 09:12:27 +0900 |
---|---|---|
committer | Yasuhiro Kimura <yasu@FreeBSD.org> | 2024-03-13 09:59:02 +0900 |
commit | 439291470380e1afc631b46ecb02c7345d389f7a (patch) | |
tree | b62c28d236f78a4a9aff37f4c64460f64c62c9cd | |
parent | bcc97b9937de307a7567e8682a96605f2e5bcebd (diff) | |
download | freebsd-ports-439291470380e1afc631b46ecb02c7345d389f7a.zip |
security/pecl-xxtea: Add new port
Add security/pecl-xxtea, XXTEA encryption algorithm extension for PHP.
MFH: 2024Q1
(cherry picked from commit de40af5ca187d945ab9458d14a62539db33de517)
-rw-r--r-- | security/Makefile | 1 | ||||
-rw-r--r-- | security/pecl-xxtea/Makefile | 14 | ||||
-rw-r--r-- | security/pecl-xxtea/distinfo | 3 | ||||
-rw-r--r-- | security/pecl-xxtea/files/patch-php__xxtea.c | 29 | ||||
-rw-r--r-- | security/pecl-xxtea/pkg-descr | 4 |
5 files changed, 51 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile index 24e5ef2f8ead..c61c48bcc171 100644 --- a/security/Makefile +++ b/security/Makefile @@ -797,6 +797,7 @@ SUBDIR += pecl-pkcs11 SUBDIR += pecl-scrypt SUBDIR += pecl-ssh2 + SUBDIR += pecl-xxtea SUBDIR += peda SUBDIR += pev SUBDIR += pgpdump diff --git a/security/pecl-xxtea/Makefile b/security/pecl-xxtea/Makefile new file mode 100644 index 000000000000..9df1ae76aeb6 --- /dev/null +++ b/security/pecl-xxtea/Makefile @@ -0,0 +1,14 @@ +PORTNAME= xxtea +DISTVERSION= 1.0.11 +CATEGORIES= security + +MAINTAINER= yasu@FreeBSD.org +COMMENT= XXTEA encryption algorithm extension for PHP +WWW= https://github.com/xxtea/xxtea-pecl + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +USES= dos2unix php:pecl + +.include <bsd.port.mk> diff --git a/security/pecl-xxtea/distinfo b/security/pecl-xxtea/distinfo new file mode 100644 index 000000000000..2cd512de6cb2 --- /dev/null +++ b/security/pecl-xxtea/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1710288047 +SHA256 (PECL/xxtea-1.0.11.tgz) = 5b1e318d3e70b27ad017d125d09ba3cf7bb3859e11be864a7bc3ddba421108af +SIZE (PECL/xxtea-1.0.11.tgz) = 7404 diff --git a/security/pecl-xxtea/files/patch-php__xxtea.c b/security/pecl-xxtea/files/patch-php__xxtea.c new file mode 100644 index 000000000000..2eab88f6ac5f --- /dev/null +++ b/security/pecl-xxtea/files/patch-php__xxtea.c @@ -0,0 +1,29 @@ +--- php_xxtea.c.orig 2024-03-12 22:05:18 UTC ++++ php_xxtea.c +@@ -275,7 +275,7 @@ ZEND_FUNCTION(xxtea_encrypt) { + size_t i, ret_length; + uint8_t fixed_key[16]; + +- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &data, &data_len, &key, &key_len) == FAILURE) { ++ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &data, &data_len, &key, &key_len) == FAILURE) { + return; + } + if (data_len == 0) { +@@ -308,7 +308,7 @@ ZEND_FUNCTION(xxtea_decrypt) { + size_t i, ret_length; + uint8_t fixed_key[16]; + +- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &data, &data_len, &key, &key_len) == FAILURE) { ++ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &data, &data_len, &key, &key_len) == FAILURE) { + return; + } + if (data_len == 0) { +@@ -340,7 +340,7 @@ ZEND_MINIT_FUNCTION(xxtea) { + ZEND_MINIT_FUNCTION(xxtea) { + zend_class_entry ce; + INIT_CLASS_ENTRY(ce, "XXTEA", xxtea_method); +- xxtea_ce = zend_register_internal_class(&ce TSRMLS_CC); ++ xxtea_ce = zend_register_internal_class(&ce); + return SUCCESS; + } + diff --git a/security/pecl-xxtea/pkg-descr b/security/pecl-xxtea/pkg-descr new file mode 100644 index 000000000000..589cc44ee983 --- /dev/null +++ b/security/pecl-xxtea/pkg-descr @@ -0,0 +1,4 @@ +XXTEA is a fast and secure encryption algorithm. This is a XXTEA +extension for PHP. It is different from the original XXTEA encryption +algorithm. It encrypts and decrypts string instead of uint32 array, +and the key is also string. |