@@ -0,0 +1,28 @@
|
|||||||
|
From cc6e787af828c94c3268465082d5299bb91e3386 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jelle van der Waa <jelle@archlinux.org>
|
||||||
|
Date: Fri, 6 Dec 2024 19:14:16 +0100
|
||||||
|
Subject: [PATCH] test: disable openssl 3.4.0 incompatible tests
|
||||||
|
|
||||||
|
The shake128/shake256 hashing algorithms broke due to an OpenSSL 3.4
|
||||||
|
incompatible change and now throws an Error.
|
||||||
|
---
|
||||||
|
test/parallel/test-crypto-oneshot-hash.js | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/test/parallel/test-crypto-oneshot-hash.js b/test/parallel/test-crypto-oneshot-hash.js
|
||||||
|
index 56b4c04a65..4c96014831 100644
|
||||||
|
--- a/test/parallel/test-crypto-oneshot-hash.js
|
||||||
|
+++ b/test/parallel/test-crypto-oneshot-hash.js
|
||||||
|
@@ -32,6 +32,9 @@ const input = fs.readFileSync(fixtures.path('utf8_test_text.txt'));
|
||||||
|
|
||||||
|
for (const method of methods) {
|
||||||
|
for (const outputEncoding of ['buffer', 'hex', 'base64', undefined]) {
|
||||||
|
+ // Skip failing tests on OpenSSL 3.4.0
|
||||||
|
+ if (method.startsWith("shake"))
|
||||||
|
+ continue;
|
||||||
|
const oldDigest = crypto.createHash(method).update(input).digest(outputEncoding || 'hex');
|
||||||
|
const digestFromBuffer = crypto.hash(method, input, outputEncoding);
|
||||||
|
assert.deepStrictEqual(digestFromBuffer, oldDigest,
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
||||||
+80
@@ -0,0 +1,80 @@
|
|||||||
|
From 93eabf6a91d30e7bb852d20ade1e5b542dee6b35 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jelle van der Waa <jelle@archlinux.org>
|
||||||
|
Date: Fri, 6 Dec 2024 18:24:41 +0100
|
||||||
|
Subject: [PATCH 1/2] test: make test-crypto-hash compatible with OpenSSL >
|
||||||
|
3.4.0
|
||||||
|
|
||||||
|
OpenSSL 3.4 has a breaking change where the outputLength is now
|
||||||
|
mandatory for shake* hash algorithms.
|
||||||
|
|
||||||
|
https://github.com/openssl/openssl/commit/b911fef216d1386210ec24e201d54d709528abb4
|
||||||
|
---
|
||||||
|
test/common/index.js | 4 ++++
|
||||||
|
test/parallel/test-crypto-hash.js | 29 ++++++++++++++++-------------
|
||||||
|
2 files changed, 20 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/common/index.js b/test/common/index.js
|
||||||
|
index 50595945b1..df5784068e 100644
|
||||||
|
--- a/test/common/index.js
|
||||||
|
+++ b/test/common/index.js
|
||||||
|
@@ -1059,6 +1059,10 @@ const common = {
|
||||||
|
return hasOpenSSL(3, 2);
|
||||||
|
},
|
||||||
|
|
||||||
|
+ get hasOpenSSL34() {
|
||||||
|
+ return hasOpenSSL(3, 4);
|
||||||
|
+ },
|
||||||
|
+
|
||||||
|
get inFreeBSDJail() {
|
||||||
|
if (inFreeBSDJail !== null) return inFreeBSDJail;
|
||||||
|
|
||||||
|
diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js
|
||||||
|
index 83218c105a..a386de866f 100644
|
||||||
|
--- a/test/parallel/test-crypto-hash.js
|
||||||
|
+++ b/test/parallel/test-crypto-hash.js
|
||||||
|
@@ -7,6 +7,7 @@ const assert = require('assert');
|
||||||
|
const crypto = require('crypto');
|
||||||
|
const fs = require('fs');
|
||||||
|
|
||||||
|
+const { hasOpenSSL34 } = common;
|
||||||
|
const fixtures = require('../common/fixtures');
|
||||||
|
|
||||||
|
let cryptoType;
|
||||||
|
@@ -182,19 +183,21 @@ assert.throws(
|
||||||
|
|
||||||
|
// Test XOF hash functions and the outputLength option.
|
||||||
|
{
|
||||||
|
- // Default outputLengths.
|
||||||
|
- assert.strictEqual(crypto.createHash('shake128').digest('hex'),
|
||||||
|
- '7f9c2ba4e88f827d616045507605853e');
|
||||||
|
- assert.strictEqual(crypto.createHash('shake128', null).digest('hex'),
|
||||||
|
- '7f9c2ba4e88f827d616045507605853e');
|
||||||
|
- assert.strictEqual(crypto.createHash('shake256').digest('hex'),
|
||||||
|
- '46b9dd2b0ba88d13233b3feb743eeb24' +
|
||||||
|
- '3fcd52ea62b81b82b50c27646ed5762f');
|
||||||
|
- assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 })
|
||||||
|
- .copy() // Default outputLength.
|
||||||
|
- .digest('hex'),
|
||||||
|
- '46b9dd2b0ba88d13233b3feb743eeb24' +
|
||||||
|
- '3fcd52ea62b81b82b50c27646ed5762f');
|
||||||
|
+ // Default outputLengths. Since OpenSSL 3.4 an outputLength is mandatory
|
||||||
|
+ if (!hasOpenSSL34) {
|
||||||
|
+ assert.strictEqual(crypto.createHash('shake128').digest('hex'),
|
||||||
|
+ '7f9c2ba4e88f827d616045507605853e');
|
||||||
|
+ assert.strictEqual(crypto.createHash('shake128', null).digest('hex'),
|
||||||
|
+ '7f9c2ba4e88f827d616045507605853e');
|
||||||
|
+ assert.strictEqual(crypto.createHash('shake256').digest('hex'),
|
||||||
|
+ '46b9dd2b0ba88d13233b3feb743eeb24' +
|
||||||
|
+ '3fcd52ea62b81b82b50c27646ed5762f');
|
||||||
|
+ assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 })
|
||||||
|
+ .copy() // Default outputLength.
|
||||||
|
+ .digest('hex'),
|
||||||
|
+ '46b9dd2b0ba88d13233b3feb743eeb24' +
|
||||||
|
+ '3fcd52ea62b81b82b50c27646ed5762f');
|
||||||
|
+ }
|
||||||
|
|
||||||
|
// Short outputLengths.
|
||||||
|
assert.strictEqual(crypto.createHash('shake128', { outputLength: 0 })
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
From 25a53e0c616369d27cc66bd9bba4b6c831a63c20 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jelle van der Waa <jelle@archlinux.org>
|
||||||
|
Date: Fri, 6 Dec 2024 19:10:48 +0100
|
||||||
|
Subject: [PATCH 2/2] test: adjust OpenSSL error code for 3.4.0
|
||||||
|
|
||||||
|
---
|
||||||
|
test/parallel/test-tls-psk-circuit.js | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/test/parallel/test-tls-psk-circuit.js b/test/parallel/test-tls-psk-circuit.js
|
||||||
|
index 2b49161df8..ee84b1d2f0 100644
|
||||||
|
--- a/test/parallel/test-tls-psk-circuit.js
|
||||||
|
+++ b/test/parallel/test-tls-psk-circuit.js
|
||||||
|
@@ -66,7 +66,8 @@ const expectedHandshakeErr = common.hasOpenSSL32 ?
|
||||||
|
'ERR_SSL_SSL/TLS_ALERT_HANDSHAKE_FAILURE' : 'ERR_SSL_SSLV3_ALERT_HANDSHAKE_FAILURE';
|
||||||
|
test({ psk: USERS.UserB, identity: 'UserC' }, {}, expectedHandshakeErr);
|
||||||
|
// Recognized user but incorrect secret should fail handshake
|
||||||
|
-const expectedIllegalParameterErr = common.hasOpenSSL32 ?
|
||||||
|
+const expectedIllegalParameterErr = common.hasOpenSSL34 ?
|
||||||
|
+ 'ERR_SSL_TLSV1_ALERT_DECRYPT_ERROR' : common.hasOpenSSL32 ?
|
||||||
|
'ERR_SSL_SSL/TLS_ALERT_ILLEGAL_PARAMETER' : 'ERR_SSL_SSLV3_ALERT_ILLEGAL_PARAMETER';
|
||||||
|
test({ psk: USERS.UserA, identity: 'UserB' }, {}, expectedIllegalParameterErr);
|
||||||
|
test({ psk: USERS.UserB, identity: 'UserB' });
|
||||||
|
--
|
||||||
|
2.47.1
|
||||||
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
Index: src/i18n.cc
|
|
||||||
diff --git a/deps/v8/src/i18n.cc b/deps/v8/src/i18n.cc
|
|
||||||
index d2245ef34a9a319a53b4cf4b4ea05ec095fef2d5..7c22871ff5e440f771659d44a0db013b34ec2105 100644
|
|
||||||
--- a/deps/v8/src/i18n.cc
|
|
||||||
+++ b/deps/v8/src/i18n.cc
|
|
||||||
@@ -30,8 +30,13 @@
|
|
||||||
#include "unicode/ucol.h"
|
|
||||||
#include "unicode/ucurr.h"
|
|
||||||
#include "unicode/unum.h"
|
|
||||||
+#include "unicode/uvernum.h"
|
|
||||||
#include "unicode/uversion.h"
|
|
||||||
|
|
||||||
+#if U_ICU_VERSION_MAJOR_NUM >= 59
|
|
||||||
+#include "unicode/char16ptr.h"
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
namespace v8 {
|
|
||||||
namespace internal {
|
|
||||||
|
|
||||||
@@ -270,8 +275,13 @@ icu::DecimalFormat* CreateICUNumberFormat(
|
|
||||||
}
|
|
||||||
|
|
||||||
UErrorCode status_digits = U_ZERO_ERROR;
|
|
||||||
+#if U_ICU_VERSION_MAJOR_NUM >= 59
|
|
||||||
uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
|
|
||||||
- currency.getTerminatedBuffer(), &status_digits);
|
|
||||||
+ icu::toUCharPtr(currency.getTerminatedBuffer()), &status_digits);
|
|
||||||
+#else
|
|
||||||
+ uint32_t fraction_digits = ucurr_getDefaultFractionDigits(
|
|
||||||
+ currency.getTerminatedBuffer(), &status_digits);
|
|
||||||
+#endif
|
|
||||||
if (U_SUCCESS(status_digits)) {
|
|
||||||
number_format->setMinimumFractionDigits(fraction_digits);
|
|
||||||
number_format->setMaximumFractionDigits(fraction_digits);
|
|
||||||
Index: src/runtime/runtime-i18n.cc
|
|
||||||
diff --git a/deps/v8/src/runtime/runtime-i18n.cc b/deps/v8/src/runtime/runtime-i18n.cc
|
|
||||||
index 0b45381914641a824e36e99eaa0d315bf96252aa..e89175a37db11aa6990888e26e6bb989cf7c36b5 100644
|
|
||||||
--- a/deps/v8/src/runtime/runtime-i18n.cc
|
|
||||||
+++ b/deps/v8/src/runtime/runtime-i18n.cc
|
|
||||||
@@ -43,6 +43,7 @@
|
|
||||||
#include "unicode/uloc.h"
|
|
||||||
#include "unicode/unistr.h"
|
|
||||||
#include "unicode/unum.h"
|
|
||||||
+#include "unicode/ustring.h"
|
|
||||||
#include "unicode/uversion.h"
|
|
||||||
|
|
||||||
|
|
||||||
@@ -609,10 +610,11 @@ RUNTIME_FUNCTION(Runtime_InternalCompare) {
|
|
||||||
String::FlatContent flat2 = string2->GetFlatContent();
|
|
||||||
std::unique_ptr<uc16[]> sap1;
|
|
||||||
std::unique_ptr<uc16[]> sap2;
|
|
||||||
- const UChar* string_val1 = GetUCharBufferFromFlat(flat1, &sap1, length1);
|
|
||||||
- const UChar* string_val2 = GetUCharBufferFromFlat(flat2, &sap2, length2);
|
|
||||||
- result =
|
|
||||||
- collator->compare(string_val1, length1, string_val2, length2, status);
|
|
||||||
+ icu::UnicodeString string_val1(
|
|
||||||
+ FALSE, GetUCharBufferFromFlat(flat1, &sap1, length1), length1);
|
|
||||||
+ icu::UnicodeString string_val2(
|
|
||||||
+ FALSE, GetUCharBufferFromFlat(flat2, &sap2, length2), length2);
|
|
||||||
+ result = collator->compare(string_val1, string_val2, status);
|
|
||||||
}
|
|
||||||
if (U_FAILURE(status)) return isolate->ThrowIllegalOperation();
|
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<IsA>app:console</IsA>
|
<IsA>app:console</IsA>
|
||||||
<Summary>Evented I/O for V8 javascript</Summary>
|
<Summary>Evented I/O for V8 javascript</Summary>
|
||||||
<Description>Node.js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser.</Description>
|
<Description>Node.js is an open-source, cross-platform, JavaScript runtime environment. It executes JavaScript code outside of a browser.</Description>
|
||||||
<Archive sha1sum="57070b8062ca616bdc0372ff125905fd7949984b" type="tarxz">https://nodejs.org/dist/v22.7.0/node-v22.7.0.tar.xz</Archive>
|
<Archive sha1sum="e981802c004f509d89e33de44d120efe1fb7c8cb" type="tarxz">https://nodejs.org/dist/v23.4.0/node-v23.4.0.tar.xz</Archive>
|
||||||
<BuildDependencies>
|
<BuildDependencies>
|
||||||
<Dependency>icu4c-devel</Dependency>
|
<Dependency>icu4c-devel</Dependency>
|
||||||
<Dependency>libuv-devel</Dependency>
|
<Dependency>libuv-devel</Dependency>
|
||||||
@@ -22,7 +22,9 @@
|
|||||||
<Dependency>libnghttp2-devel</Dependency>
|
<Dependency>libnghttp2-devel</Dependency>
|
||||||
</BuildDependencies>
|
</BuildDependencies>
|
||||||
<Patches>
|
<Patches>
|
||||||
<!--<Patch level="1">nodejs-v8-icu59.patch</Patch> -->
|
<Patch level="1">0001-test-make-test-crypto-hash-compatible-with-OpenSSL-3.patch</Patch>
|
||||||
|
<Patch level="1">0002-test-adjust-OpenSSL-error-code-for-3.4.0.patch</Patch>
|
||||||
|
<Patch level="1">0001-test-disable-openssl-3.4.0-incompatible-tests.patch</Patch>
|
||||||
</Patches>
|
</Patches>
|
||||||
</Source>
|
</Source>
|
||||||
|
|
||||||
@@ -48,6 +50,13 @@
|
|||||||
</Package>
|
</Package>
|
||||||
|
|
||||||
<History>
|
<History>
|
||||||
|
<Update release="18">
|
||||||
|
<Date>2025-01-04</Date>
|
||||||
|
<Version>23.4.0</Version>
|
||||||
|
<Comment>Version bump.</Comment>
|
||||||
|
<Name>Pisi Linux Community</Name>
|
||||||
|
<Email>admin@pisilinux.org</Email>
|
||||||
|
</Update>
|
||||||
<Update release="17">
|
<Update release="17">
|
||||||
<Date>2024-12-19</Date>
|
<Date>2024-12-19</Date>
|
||||||
<Version>22.7.0</Version>
|
<Version>22.7.0</Version>
|
||||||
|
|||||||
Reference in New Issue
Block a user