@php-wasm/web 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +14 -15
- package/package.json +6 -6
package/index.js
CHANGED
|
@@ -1014,28 +1014,27 @@ class xe {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
async readNextTLSRecord(e) {
|
|
1016
1016
|
for (; ; ) {
|
|
1017
|
-
for (let
|
|
1018
|
-
const
|
|
1019
|
-
if (
|
|
1020
|
-
|
|
1021
|
-
`Alert message received: ${he[_.fragment[0]]} ${He[_.fragment[1]]}`
|
|
1022
|
-
);
|
|
1023
|
-
if (_.type === e)
|
|
1024
|
-
return this.receivedTLSRecords.splice(i, 1), this.sessionKeys && _.type !== C.ChangeCipherSpec && (_.fragment = await this.decryptData(
|
|
1025
|
-
_.type,
|
|
1026
|
-
_.fragment
|
|
1027
|
-
)), _;
|
|
1017
|
+
for (let a = 0; a < this.receivedTLSRecords.length; a++) {
|
|
1018
|
+
const c = this.receivedTLSRecords[a];
|
|
1019
|
+
if (c.type === e)
|
|
1020
|
+
return this.receivedTLSRecords.splice(a, 1), c;
|
|
1028
1021
|
}
|
|
1029
|
-
const t = await this.pollBytes(5), r = t[3] << 8 | t[4], n = {
|
|
1030
|
-
type:
|
|
1022
|
+
const t = await this.pollBytes(5), r = t[3] << 8 | t[4], n = t[0], i = await this.pollBytes(r), _ = {
|
|
1023
|
+
type: n,
|
|
1031
1024
|
version: {
|
|
1032
1025
|
major: t[1],
|
|
1033
1026
|
minor: t[2]
|
|
1034
1027
|
},
|
|
1035
1028
|
length: r,
|
|
1036
|
-
fragment: await this.
|
|
1029
|
+
fragment: this.sessionKeys && n !== C.ChangeCipherSpec ? await this.decryptData(n, i) : i
|
|
1037
1030
|
};
|
|
1038
|
-
|
|
1031
|
+
if (_.type === C.Alert) {
|
|
1032
|
+
const a = he[_.fragment[0]], c = He[_.fragment[1]];
|
|
1033
|
+
throw new Error(
|
|
1034
|
+
`TLS non-warning alert received: ${a} ${c}`
|
|
1035
|
+
);
|
|
1036
|
+
}
|
|
1037
|
+
this.receivedTLSRecords.push(_);
|
|
1039
1038
|
}
|
|
1040
1039
|
}
|
|
1041
1040
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@php-wasm/web",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "PHP.wasm for the web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"type": "module",
|
|
30
30
|
"main": "index.js",
|
|
31
31
|
"types": "index.d.ts",
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "916516040522ab257109dd617bfcc493bb4f2eb1",
|
|
33
33
|
"engines": {
|
|
34
34
|
"node": ">=16.15.1",
|
|
35
35
|
"npm": ">=8.11.0"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"wasm-feature-detect": "1.8.0",
|
|
43
43
|
"ws": "8.18.0",
|
|
44
44
|
"yargs": "17.7.2",
|
|
45
|
-
"@php-wasm/universal": "1.0.
|
|
46
|
-
"@php-wasm/util": "1.0.
|
|
47
|
-
"@php-wasm/logger": "1.0.
|
|
48
|
-
"@php-wasm/fs-journal": "1.0.
|
|
45
|
+
"@php-wasm/universal": "1.0.15",
|
|
46
|
+
"@php-wasm/util": "1.0.15",
|
|
47
|
+
"@php-wasm/logger": "1.0.15",
|
|
48
|
+
"@php-wasm/fs-journal": "1.0.15"
|
|
49
49
|
}
|
|
50
50
|
}
|