mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
Replace NSS with Pale Moon's
This commit is contained in:
parent
ff1e5e48bf
commit
8c2e376f94
2870 changed files with 1762232 additions and 1374220 deletions
44
security/nss/automation/taskcluster/scripts/run_hacl.sh
Normal file → Executable file
44
security/nss/automation/taskcluster/scripts/run_hacl.sh
Normal file → Executable file
|
|
@ -8,33 +8,37 @@ fi
|
|||
|
||||
set -e -x -v
|
||||
|
||||
# The docker image this is running in has the HACL* and NSS sources.
|
||||
# The extracted C code from HACL* is already generated and the HACL* tests were
|
||||
# successfully executed.
|
||||
# The docker image this is running in has NSS sources.
|
||||
# Get the HACL* source, containing a snapshot of the C code, extracted on the
|
||||
# HACL CI.
|
||||
git clone -q "https://github.com/hacl-star/hacl-star" ~/hacl-star
|
||||
git -C ~/hacl-star checkout -q 51a72a953a4ee6f91e63b2816ae5c4e62edf35d6
|
||||
|
||||
# Verify HACL*. Taskcluster fails when we do this in the image build.
|
||||
make -C hacl-star verify-nss -j$(nproc)
|
||||
|
||||
# Add license header to specs
|
||||
spec_files=($(find ~/hacl-star/specs -type f -name '*.fst'))
|
||||
for f in "${spec_files[@]}"; do
|
||||
cat /tmp/license.txt "$f" > /tmp/tmpfile && mv /tmp/tmpfile "$f"
|
||||
done
|
||||
|
||||
# Format the extracted C code.
|
||||
cd ~/hacl-star/snapshots/nss
|
||||
# Format the C snapshot.
|
||||
cd ~/hacl-star/dist/mozilla
|
||||
cp ~/nss/.clang-format .
|
||||
find . -type f -name '*.[ch]' -exec clang-format -i {} \+
|
||||
cd ~/hacl-star/dist/karamel
|
||||
cp ~/nss/.clang-format .
|
||||
find . -type f -name '*.[ch]' -exec clang-format -i {} \+
|
||||
|
||||
# These diff commands will return 1 if there are differences and stop the script.
|
||||
files=($(find ~/nss/lib/freebl/verified/ -type f -name '*.[ch]'))
|
||||
|
||||
# We have two checks in the script.
|
||||
# The first one only checks the files in the verified/internal folder; the second one does for all the rest
|
||||
# It was implemented like this due to not uniqueness of the names in the verified folders
|
||||
# For instance, the files Hacl_Chacha20.h are present in both directories, but the content differs.
|
||||
|
||||
files=($(find ~/nss/lib/freebl/verified/internal -type f -name '*.[ch]'))
|
||||
for f in "${files[@]}"; do
|
||||
diff $f $(basename "$f")
|
||||
file_name=$(basename "$f")
|
||||
hacl_file=($(find ~/hacl-star/dist/mozilla/internal/ -type f -name $file_name))
|
||||
diff $hacl_file $f
|
||||
done
|
||||
|
||||
# Check that the specs didn't change either.
|
||||
cd ~/hacl-star/specs
|
||||
files=($(find ~/nss/lib/freebl/verified/specs -type f))
|
||||
files=($(find ~/nss/lib/freebl/verified/ -type f -name '*.[ch]' -not -path "*/freebl/verified/internal/*" -not -path "*/freebl/verified/config.h"))
|
||||
for f in "${files[@]}"; do
|
||||
diff $f $(basename "$f")
|
||||
file_name=$(basename "$f")
|
||||
hacl_file=($(find ~/hacl-star/dist/mozilla/ ~/hacl-star/dist/karamel/ -type f -name $file_name -not -path "*/hacl-star/dist/mozilla/internal/*"))
|
||||
diff $hacl_file $f
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue