diff --git a/security/p5-Crypt-OpenSSL-AES/Makefile b/security/p5-Crypt-OpenSSL-AES/Makefile index 06d160f0405ff..15ac55276a6a3 100644 --- a/security/p5-Crypt-OpenSSL-AES/Makefile +++ b/security/p5-Crypt-OpenSSL-AES/Makefile @@ -1,16 +1,32 @@ PORTNAME= Crypt-OpenSSL-AES -PORTVERSION= 0.02 -PORTREVISION= 3 +PORTVERSION= 0.19 CATEGORIES= security perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- -MAINTAINER= jdferrell3@yahoo.com +MAINTAINER= svysh.fbsd@gmail.com COMMENT= Perl wrapper around OpenSSL's AES library WWW= https://metacpan.org/release/Crypt-OpenSSL-AES -USES= perl5 ssl +LICENSE= ART10 GPLv1+ +LICENSE_COMB= dual +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${RUN_DEPENDS} +RUN_DEPENDS= p5-Crypt-OpenSSL-Guess>=0.10:security/p5-Crypt-OpenSSL-Guess \ + p5-File-Which>=0:sysutils/p5-File-Which + +USES= perl5 shebangfix ssl USE_PERL5= configure +SHEBANG_FILES= t/* +perl_OLD_CMD= .*perl MAKE_ARGS+= PASTHRU_INC=-I${OPENSSLINC} +pre-configure: + ${REINPLACE_CMD} -e 's|SSLBIN|${OPENSSLBASE}/bin/openssl|g' ${WRKSRC}/t/00-openssl-version.t + ${REINPLACE_CMD} -e 's|SSLBIN|${OPENSSLBASE}/bin/openssl|g' ${WRKSRC}/t/09-key-size.t + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_PERL_REL}/${PERL_ARCH}/${PERL_VER}/auto/Crypt/OpenSSL/AES/AES.so + .include diff --git a/security/p5-Crypt-OpenSSL-AES/distinfo b/security/p5-Crypt-OpenSSL-AES/distinfo index 66203e75651ba..04b16a9b5d4df 100644 --- a/security/p5-Crypt-OpenSSL-AES/distinfo +++ b/security/p5-Crypt-OpenSSL-AES/distinfo @@ -1,2 +1,3 @@ -SHA256 (Crypt-OpenSSL-AES-0.02.tar.gz) = b66fab514edf97fc32f58da257582704a210c2b35e297d5c31b7fa2ffd08e908 -SIZE (Crypt-OpenSSL-AES-0.02.tar.gz) = 12487 +TIMESTAMP = 1699915593 +SHA256 (Crypt-OpenSSL-AES-0.19.tar.gz) = 35a8af2ebdc26280a4f5916c1a97c3431e7cbef3e7451e1e917f7cce4d8c9c59 +SIZE (Crypt-OpenSSL-AES-0.19.tar.gz) = 156698 diff --git a/security/p5-Crypt-OpenSSL-AES/files/patch-AES.xs b/security/p5-Crypt-OpenSSL-AES/files/patch-AES.xs new file mode 100644 index 0000000000000..4734c763d6919 --- /dev/null +++ b/security/p5-Crypt-OpenSSL-AES/files/patch-AES.xs @@ -0,0 +1,11 @@ +--- AES.xs.orig 2023-11-10 22:50:53 UTC ++++ AES.xs +@@ -2,7 +2,7 @@ + #include "EXTERN.h" + #include "perl.h" + #include "XSUB.h" +-#include "openssl/opensslv.h" ++#include + + #include + #if OPENSSL_VERSION_NUMBER >= 0x00908000L diff --git a/security/p5-Crypt-OpenSSL-AES/files/patch-t_00-openssl-version.t b/security/p5-Crypt-OpenSSL-AES/files/patch-t_00-openssl-version.t new file mode 100644 index 0000000000000..bf19c0304eec2 --- /dev/null +++ b/security/p5-Crypt-OpenSSL-AES/files/patch-t_00-openssl-version.t @@ -0,0 +1,11 @@ +--- t/00-openssl-version.t.orig 2023-11-10 22:50:53 UTC ++++ t/00-openssl-version.t +@@ -3,7 +3,7 @@ use Test::More tests => 1; + use File::Which qw(which); + use Test::More tests => 1; + +-my $openssl = which('openssl'); ++my $openssl = "SSLBIN"; + like($openssl, qr/openssl/, "Found openssl"); + print "$openssl version: "; + diff --git a/security/p5-Crypt-OpenSSL-AES/files/patch-t_09-key-size.t b/security/p5-Crypt-OpenSSL-AES/files/patch-t_09-key-size.t new file mode 100644 index 0000000000000..7f4681285042e --- /dev/null +++ b/security/p5-Crypt-OpenSSL-AES/files/patch-t_09-key-size.t @@ -0,0 +1,15 @@ +--- t/09-key-size.t.orig 2023-11-10 22:50:53 UTC ++++ t/09-key-size.t +@@ -19,9 +19,9 @@ ok($c->decrypt($c->encrypt("Hello World. 123")) eq "He + ok($c->decrypt($encrypted) eq $plaintext, "decrypt with key length 32 (AES-256-ECB)"); + ok($c->decrypt($c->encrypt("Hello World. 123")) eq "Hello World. 123", "Simple String Encrypted/Decrypted Successfully with key length 32 AES-256-ECB"); + +-# echo -n "ABCDABCDABCDABCD"| openssl enc -nopad -e -aes-256-ecb -K '3031323330313233303132333031323330313233303132333031323330313233' | xxd -i +-# echo -n "ABCDABCDABCDABCD"| openssl enc -nopad -e -aes-192-ecb -K '303132333031323330313233303132333031323330313233' +-# echo -n "ABCDABCDABCDABCD"| openssl enc -nopad -e -aes-128-ecb -K '30313233303132333031323330313233' | xxd -i ++# echo -n "ABCDABCDABCDABCD"| SSLBIN enc -nopad -e -aes-256-ecb -K '3031323330313233303132333031323330313233303132333031323330313233' | xxd -i ++# echo -n "ABCDABCDABCDABCD"| SSLBIN enc -nopad -e -aes-192-ecb -K '303132333031323330313233303132333031323330313233' ++# echo -n "ABCDABCDABCDABCD"| SSLBIN enc -nopad -e -aes-128-ecb -K '30313233303132333031323330313233' | xxd -i + + # + # test AES-192-ECB