-
Notifications
You must be signed in to change notification settings - Fork 3
/
validate.sh
executable file
·53 lines (37 loc) · 1.35 KB
/
validate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
# Check version of OS.
recommendedOS="CentOS Linux release 7.6.1810 (Core) "
currentOS=$(cat /etc/centos-release)
if [ "$currentOS" != "$recommendedOS" ]
then
echo "[WARNING] You are not building on $recommendedOS."
fi
# Build implementation library.
make -C ./src
if [ ! -f "./validate" ]
then
echo "There were errors during compilation."
exit 1
fi
echo "Attempting to produce validation output..."
export LD_LIBRARY_PATH=.
./validate > ./validation.txt
if [[ $? != 0 ]]
then
echo "[ERROR] Validation output not produced."
exit 1
fi
echo "[SUCCESS]"
# Create submission tar file.
echo "Creating submission package."
tar -czvf libIREX10.tar.gz ./config ./libIREX10.so ./validation.txt
echo "[SUCCESS]
A submission package has been generated (libIREX10.tar.gz).
You must encrypt and sign this file before transmitting it to NIST. Please follow the
encryption instructions at https://www.nist.gov/sites/default/files/nist_encryption.pdf
using the public key 'irex.asc'.
For example:
gpg --default-key <ParticipantEmail> --encrypt --recipient [email protected] --sign \\
--output libIREX_1N_<ParticipantName>_<SubmissionNumber>.gpg libIREX10.tar.gz
If the encrypted file is 22 Mb or less you may send it to [email protected] as an attachment.
Alternatively, you can provide a download link from a webserver (e.g., a Google Drive link)."