asherah 1.3.26 → 1.3.28
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/.asherah-version +1 -1
- package/package.json +2 -1
- package/scripts/download-libraries.sh +13 -10
- package/src/asherah.cc +144 -114
- package/src/asherah.d.ts +4 -0
- package/src/cobhan.h +23 -25
- package/src/cobhan_napi_interop.h +54 -59
- package/src/logging.cc +218 -2
- package/src/logging.h +43 -70
- package/SHA256SUMS +0 -4
- package/SHA256SUMS-darwin +0 -4
package/.asherah-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ASHERAH_VERSION=v0.4.
|
|
1
|
+
ASHERAH_VERSION=v0.4.30
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "asherah",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.28",
|
|
4
4
|
"description": "Asherah envelope encryption and key rotation library",
|
|
5
5
|
"exports": {
|
|
6
6
|
"node-addons": "./dist/asherah.node"
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
13
|
"preinstall": "scripts/download-libraries.sh",
|
|
14
|
+
"load": "node --max-old-space-size=500 scripts/dumpster-fire.js",
|
|
14
15
|
"install": "scripts/build.sh",
|
|
15
16
|
"test:mocha": "mocha",
|
|
16
17
|
"test": "nyc npm run test:mocha",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
echo "Downloading Asherah libraries"
|
|
4
4
|
|
|
5
|
+
# shellcheck source=/dev/null
|
|
5
6
|
source .asherah-version
|
|
6
7
|
|
|
7
|
-
#rm -rf lib
|
|
8
8
|
mkdir -p lib
|
|
9
9
|
cd lib || exit 1
|
|
10
10
|
|
|
@@ -16,12 +16,12 @@ if [[ "${OS}" == 'Linux' ]]; then
|
|
|
16
16
|
echo "Linux x64"
|
|
17
17
|
ARCHIVE=libasherah-x64.a
|
|
18
18
|
HEADER=libasherah-x64-archive.h
|
|
19
|
-
SUMS
|
|
19
|
+
SUMS=SHA256SUMS
|
|
20
20
|
elif [[ ${MACHINE} == 'aarch64' ]]; then
|
|
21
21
|
echo "Linux arm64"
|
|
22
22
|
ARCHIVE=libasherah-arm64.a
|
|
23
23
|
HEADER=libasherah-arm64-archive.h
|
|
24
|
-
SUMS
|
|
24
|
+
SUMS=SHA256SUMS
|
|
25
25
|
else
|
|
26
26
|
echo "Unsupported CPU architecture"
|
|
27
27
|
exit 1
|
|
@@ -31,12 +31,12 @@ elif [[ ${OS} == 'Darwin' ]]; then
|
|
|
31
31
|
echo "MacOS x64"
|
|
32
32
|
ARCHIVE=libasherah-darwin-x64.a
|
|
33
33
|
HEADER=libasherah-darwin-x64-archive.h
|
|
34
|
-
SUMS
|
|
34
|
+
SUMS=SHA256SUMS-darwin
|
|
35
35
|
elif [[ ${MACHINE} == 'arm64' ]]; then
|
|
36
36
|
echo "MacOS arm64"
|
|
37
37
|
ARCHIVE=libasherah-darwin-arm64.a
|
|
38
38
|
HEADER=libasherah-darwin-arm64-archive.h
|
|
39
|
-
SUMS
|
|
39
|
+
SUMS=SHA256SUMS-darwin
|
|
40
40
|
else
|
|
41
41
|
echo "Unsupported CPU architecture"
|
|
42
42
|
exit 1
|
|
@@ -46,10 +46,13 @@ else
|
|
|
46
46
|
exit 1
|
|
47
47
|
fi
|
|
48
48
|
|
|
49
|
-
curl -s -L --fail -O --retry 999 --retry-max-time 0 "https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/${ARCHIVE}" || echo "Failed to download ${ASHERAH_VERSION}/${ARCHIVE}"
|
|
50
|
-
|
|
49
|
+
curl -s -L --fail --etag-save "${ARCHIVE}.etag" --etag-compare "${ARCHIVE}.etag" -O --retry 999 --retry-max-time 0 "https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/${ARCHIVE}" || echo "Failed to download ${ASHERAH_VERSION}/${ARCHIVE}"
|
|
50
|
+
|
|
51
|
+
curl -s -L --fail --etag-save "${HEADER}.etag" --etag-compare "${HEADER}.etag" -O --retry 999 --retry-max-time 0 "https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/${HEADER}" || echo "Failed to download ${ASHERAH_VERSION}/${HEADER}"
|
|
52
|
+
|
|
53
|
+
curl -s -L --fail --etag-save "${SUMS}.etag" --etag-compare "${SUMS}.etag" -O --retry 999 --retry-max-time 0 "https://github.com/godaddy/asherah-cobhan/releases/download/${ASHERAH_VERSION}/${SUMS}" || echo "Failed to download ${ASHERAH_VERSION}/${SUMS}"
|
|
51
54
|
grep -e "${ARCHIVE}" -e "${HEADER}" "${SUMS}" > ./SHA256SUM
|
|
52
|
-
|
|
55
|
+
shasum -a 256 -c ./SHA256SUM || (echo 'SHA256 mismatch!' ; rm -f ./*.a ./*.h ; exit 1)
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
cp -f "${ARCHIVE}" libasherah.a
|
|
58
|
+
cp -f "${HEADER}" libasherah.h
|