-
Notifications
You must be signed in to change notification settings - Fork 10
/
check.sh
executable file
·51 lines (46 loc) · 1.17 KB
/
check.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
#!/bin/sh
if [ $# -gt 1 ]
then
echo "Usage: $0 [>path to wolfssl>]"
return 1;
fi
WOLFSSL_DIR=../wolfssl
if [ $# -eq 1 ]
then
WOLFSSL_DIR=$1
fi
if [ ! -d $WOLFSSL_DIR ]
then
echo "Directory not found: $WOLFSSL_DIR"
return 1
fi
if [ ! -f $WOLFSSL_DIR/wolfssl/wolfcrypt/sm3.h ]
then
echo "Could not confirm directory is 'wolfssl': $WOLFSSL_DIR"
echo "Failed to find file: sm3.h"
return 1
fi
check_file() {
echo "$1 $WOLFSSL_DIR/$2/$1"
diff $1 $WOLFSSL_DIR/$2/$1
if [ "$?" = "0" ]; then
echo " SAME"
fi
}
echo "Diffing files with those in wolfssl ... "
check_file sm2.h wolfssl/wolfcrypt
check_file sm2.c wolfcrypt/src
check_file sp_sm2_c32.c wolfcrypt/src/
check_file sp_sm2_c64.c wolfcrypt/src/
check_file sp_sm2_x86_64.c wolfcrypt/src/
check_file sp_sm2_x86_64_asm.S wolfcrypt/src/
check_file sp_sm2_arm32.c wolfcrypt/src/
check_file sp_sm2_cortexm.c wolfcrypt/src/
check_file sp_sm2_armthumb.c wolfcrypt/src/
check_file sp_sm2_arm64.c wolfcrypt/src/
check_file sm3.h wolfssl/wolfcrypt
check_file sm3.c wolfcrypt/src
check_file sm3_asm.S wolfcrypt/src
check_file sm4.h wolfssl/wolfcrypt
check_file sm4.c wolfcrypt/src
echo "Done"