From 713cd7efb6a3241b300658e7c6ba6d2ee3b30f12 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 9 Apr 2023 10:29:22 -0500 Subject: [PATCH] Tests/X509: fix malformed base64 base64_decode() handles it just fine but sodium_base642bin() doesn't https://github.com/phpseclib/phpseclib/commit/e5396968c56b6ff0d4ea12f0454dd8f8e735c676 fixed this in the 3.0 branch but not the 2.0 branch it's an issue in the 2.0 branch because phpseclib2_compat uses the phpseclib 2.0 unit tests to test a thin wrapper for phpseclib 3.0 --- tests/Unit/File/X509/X509Test.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Unit/File/X509/X509Test.php b/tests/Unit/File/X509/X509Test.php index fbfed138..c409277b 100644 --- a/tests/Unit/File/X509/X509Test.php +++ b/tests/Unit/File/X509/X509Test.php @@ -296,7 +296,7 @@ KQmi+cIHJHLONdX/3Im+M17V0iNAh7Z1lOSfTRT+iiwe/F8phcEaD5q2RmvYusR7 zXZq/cLL0If0hXoPZ/EHQxjN8pxzxiUx6bJAgturnIMEfRNesxwghdr1dkUjOhGL f3kHVzgM6j3VAM7oFmMUb5y5s96Bzl10DodWitjOEH0vvnIcsppSxH1C1dCAi0o9 f/1y2XuLNhBNHMAyTqpYPX8Yvav1c+Z50OMaSXHAnTa20zv8UtiHbaAhwlifCelU -Mj93S +Mj93 -----END CERTIFICATE-----'); $x509->loadX509($x509->saveX509($decoded)); $expected = array( @@ -375,7 +375,7 @@ KQmi+cIHJHLONdX/3Im+M17V0iNAh7Z1lOSfTRT+iiwe/F8phcEaD5q2RmvYusR7 zXZq/cLL0If0hXoPZ/EHQxjN8pxzxiUx6bJAgturnIMEfRNesxwghdr1dkUjOhGL f3kHVzgM6j3VAM7oFmMUb5y5s96Bzl10DodWitjOEH0vvnIcsppSxH1C1dCAi0o9 f/1y2XuLNhBNHMAyTqpYPX8Yvav1c+Z50OMaSXHAnTa20zv8UtiHbaAhwlifCelU -Mj93S +Mj93 -----END CERTIFICATE-----'); $this->assertFalse($x509->validateSignature()); }