Skip to content

Commit a0668bd

Browse files
author
Andras Fekete
committed
Remove FIPS-check for v1
1 parent 25f542a commit a0668bd

1 file changed

Lines changed: 5 additions & 172 deletions

File tree

fips-check.sh

Lines changed: 5 additions & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,8 @@
1818

1919
Usage() {
2020
cat <<usageText
21-
Usage: $0 [flavor [keep]]
21+
Usage: $0 flavor [keep]
2222
Flavor is one of:
23-
linux (default)
24-
ios
25-
android
26-
windows
27-
freertos
28-
openrtos-3.9.2
29-
linux-ecc
30-
netbsd-selftest
31-
marvell-linux-selftest
32-
sgx
33-
netos-7.6
3423
linuxv2 (FIPSv2, use for Win10)
3524
stm32l4-v2 (FIPSv2, use for STM32L4)
3625
wolfrand
@@ -47,55 +36,6 @@ usageText
4736

4837
MAKE='make'
4938

50-
LINUX_FIPS_VERSION=v3.2.6
51-
LINUX_FIPS_REPO=git@github.com:wolfSSL/fips.git
52-
LINUX_CRYPT_VERSION=v3.2.6
53-
LINUX_CRYPT_REPO=git@github.com:cyassl/cyassl.git
54-
55-
LINUX_ECC_FIPS_VERSION=v3.10.3
56-
LINUX_ECC_FIPS_REPO=git@github.com:wolfSSL/fips.git
57-
LINUX_ECC_CRYPT_VERSION=v3.2.6
58-
LINUX_ECC_CRYPT_REPO=git@github.com:cyassl/cyassl.git
59-
60-
IOS_FIPS_VERSION=v3.4.8a
61-
IOS_FIPS_REPO=git@github.com:wolfSSL/fips.git
62-
IOS_CRYPT_VERSION=v3.4.8.fips
63-
IOS_CRYPT_REPO=git@github.com:cyassl/cyassl.git
64-
65-
ANDROID_FIPS_VERSION=v3.5.0
66-
ANDROID_FIPS_REPO=git@github.com:wolfSSL/fips.git
67-
ANDROID_CRYPT_VERSION=v3.5.0
68-
ANDROID_CRYPT_REPO=git@github.com:cyassl/cyassl.git
69-
70-
WINDOWS_FIPS_VERSION=v3.6.6
71-
WINDOWS_FIPS_REPO=git@github.com:wolfSSL/fips.git
72-
WINDOWS_CRYPT_VERSION=v3.6.6
73-
WINDOWS_CRYPT_REPO=git@github.com:cyassl/cyassl.git
74-
75-
FREERTOS_FIPS_VERSION=v3.6.1-FreeRTOS
76-
FREERTOS_FIPS_REPO=git@github.com:wolfSSL/fips.git
77-
FREERTOS_CRYPT_VERSION=v3.6.1
78-
FREERTOS_CRYPT_REPO=git@github.com:cyassl/cyassl.git
79-
80-
OPENRTOS_3_9_2_FIPS_VERSION=v3.9.2-OpenRTOS
81-
OPENRTOS_3_9_2_FIPS_REPO=git@github.com:wolfSSL/fips.git
82-
OPENRTOS_3_9_2_CRYPT_VERSION=v3.6.1
83-
OPENRTOS_3_9_2_CRYPT_REPO=git@github.com:cyassl/cyassl.git
84-
85-
#NOTE: Does not include the SGX examples yet, update version once fipsv2 is
86-
# finished and merge conflicts can be resolved. This will be tagged as
87-
# v3.12.4.sgx-examples
88-
#SGX_FIPS_VERSION=v3.12.4.sgx-examples
89-
SGX_FIPS_VERSION=v3.6.6
90-
SGX_FIPS_REPO=git@github.com:wolfSSL/fips.git
91-
SGX_CRYPT_VERSION=v3.12.4
92-
SGX_CRYPT_REPO=git@github.com:cyassl/cyassl.git
93-
94-
NETOS_7_6_FIPS_VERSION=v3.12.6
95-
NETOS_7_6_FIPS_REPO=git@github.com:wolfSSL/fips.git
96-
NETOS_7_6_CRYPT_VERSION=v3.12.4
97-
NETOS_7_6_CRYPT_REPO=git@github.com:cyassl/cyassl.git
98-
9939
# non-FIPS, CAVP only but pull in selftest
10040
# will reset above variables below in flavor switch
10141
NETBSD_FIPS_VERSION=v3.14.2b
@@ -117,61 +57,18 @@ STM32L4_V2_CRYPT_VERSION=WCv4.0.1-stable
11757
FIPS_SRCS=( fips.c fips_test.c )
11858
WC_MODS=( aes des3 sha sha256 sha512 rsa hmac random aes_asm )
11959
TEST_DIR=XXX-fips-test
120-
CRYPT_INC_PATH=cyassl/ctaocrypt
121-
CRYPT_SRC_PATH=ctaocrypt/src
60+
CRYPT_INC_PATH=undef
61+
CRYPT_SRC_PATH=undef
12262
RNG_VERSION=v3.6.0
123-
FIPS_OPTION=v1
63+
FIPS_OPTION=undef
12464
CAVP_SELFTEST_ONLY="no"
12565
GIT="git -c advice.detachedHead=false"
12666

127-
if [ "$1" == "" ]; then FLAVOR="linux"; else FLAVOR="$1"; fi
67+
if [ "$1" == "" ]; then FLAVOR="undef"; else FLAVOR="$1"; fi
12868

12969
if [ "$2" == "keep" ]; then KEEP="yes"; else KEEP="no"; fi
13070

13171
case "$FLAVOR" in
132-
ios)
133-
FIPS_VERSION=$IOS_FIPS_VERSION
134-
FIPS_REPO=$IOS_FIPS_REPO
135-
CRYPT_VERSION=$IOS_CRYPT_VERSION
136-
CRYPT_REPO=$IOS_CRYPT_REPO
137-
;;
138-
android)
139-
FIPS_VERSION=$ANDROID_FIPS_VERSION
140-
FIPS_REPO=$ANDROID_FIPS_REPO
141-
CRYPT_VERSION=$ANDROID_CRYPT_VERSION
142-
CRYPT_REPO=$ANDROID_CRYPT_REPO
143-
;;
144-
windows)
145-
FIPS_VERSION=$WINDOWS_FIPS_VERSION
146-
FIPS_REPO=$WINDOWS_FIPS_REPO
147-
CRYPT_VERSION=$WINDOWS_CRYPT_VERSION
148-
CRYPT_REPO=$WINDOWS_CRYPT_REPO
149-
;;
150-
freertos)
151-
FIPS_VERSION=$FREERTOS_FIPS_VERSION
152-
FIPS_REPO=$FREERTOS_FIPS_REPO
153-
CRYPT_VERSION=$FREERTOS_CRYPT_VERSION
154-
CRYPT_REPO=$FREERTOS_CRYPT_REPO
155-
;;
156-
openrtos-3.9.2)
157-
FIPS_VERSION=$OPENRTOS_3_9_2_FIPS_VERSION
158-
FIPS_REPO=$OPENRTOS_3_9_2_FIPS_REPO
159-
CRYPT_VERSION=$OPENRTOS_3_9_2_CRYPT_VERSION
160-
CRYPT_REPO=$OPENRTOS_3_9_2_CRYPT_REPO
161-
FIPS_CONFLICTS=( aes hmac random sha256 )
162-
;;
163-
linux)
164-
FIPS_VERSION=$LINUX_FIPS_VERSION
165-
FIPS_REPO=$LINUX_FIPS_REPO
166-
CRYPT_VERSION=$LINUX_CRYPT_VERSION
167-
CRYPT_REPO=$LINUX_CRYPT_REPO
168-
;;
169-
linux-ecc)
170-
FIPS_VERSION=$LINUX_ECC_FIPS_VERSION
171-
FIPS_REPO=$LINUX_ECC_FIPS_REPO
172-
CRYPT_VERSION=$LINUX_ECC_CRYPT_VERSION
173-
CRYPT_REPO=$LINUX_ECC_CRYPT_REPO
174-
;;
17572
linuxv2 | fipsv2-OE-ready)
17673
FIPS_VERSION=WCv4-stable
17774
FIPS_REPO=git@github.com:wolfssl/fips.git
@@ -184,42 +81,6 @@ linuxv2 | fipsv2-OE-ready)
18481
FIPS_INCS=( fips.h )
18582
FIPS_OPTION=v2
18683
;;
187-
netbsd-selftest)
188-
FIPS_VERSION=$NETBSD_FIPS_VERSION
189-
FIPS_REPO=$NETBSD_FIPS_REPO
190-
CRYPT_VERSION=$NETBSD_CRYPT_VERSION
191-
CRYPT_REPO=$NETBSD_CRYPT_REPO
192-
FIPS_SRCS=( selftest.c )
193-
WC_MODS=( dh ecc rsa dsa aes sha sha256 sha512 hmac random )
194-
CRYPT_INC_PATH=wolfssl/wolfcrypt
195-
CRYPT_SRC_PATH=wolfcrypt/src
196-
CAVP_SELFTEST_ONLY="yes"
197-
;;
198-
marvell-linux-selftest)
199-
FIPS_VERSION=$MARVELL_LINUX_FIPS_VERSION
200-
FIPS_REPO=$MARVELL_LINUX_FIPS_REPO
201-
CRYPT_VERSION=$MARVELL_LINUX_CRYPT_VERSION
202-
CRYPT_REPO=$MARVELL_LINUX_CRYPT_REPO
203-
FIPS_SRCS=( selftest.c )
204-
WC_MODS=( dh ecc rsa dsa aes sha sha256 sha512 hmac random )
205-
CRYPT_INC_PATH=wolfssl/wolfcrypt
206-
CRYPT_SRC_PATH=wolfcrypt/src
207-
CAVP_SELFTEST_ONLY="yes"
208-
CAVP_SELFTEST_OPTION=v2
209-
;;
210-
sgx)
211-
FIPS_VERSION=$SGX_FIPS_VERSION
212-
FIPS_REPO=$SGX_FIPS_REPO
213-
CRYPT_VERSION=$SGX_CRYPT_VERSION
214-
CRYPT_REPO=$SGX_CRYPT_REPO
215-
;;
216-
netos-7.6)
217-
FIPS_VERSION=$NETOS_7_6_FIPS_VERSION
218-
FIPS_REPO=$NETOS_7_6_FIPS_REPO
219-
CRYPT_VERSION=$NETOS_7_6_CRYPT_VERSION
220-
CRYPT_REPO=$NETOS_7_6_CRYPT_REPO
221-
;;
222-
22384
linuxv5)
22485
FIPS_REPO="git@github.com:wolfSSL/fips.git"
22586
FIPS_VERSION="WCv5.0-RC12"
@@ -316,34 +177,6 @@ case "$FIPS_OPTION" in
316177
echo "Don't need to copy in tagged wolfCrypt files for FIPS Ready."
317178
;;
318179

319-
v1)
320-
# make a clone of the last FIPS release tag
321-
if ! $GIT clone --depth 1 -b "$CRYPT_VERSION" "$CRYPT_REPO" old-tree; then
322-
echo "fips-check: Couldn't checkout the FIPS release."
323-
exit 1
324-
fi
325-
326-
for MOD in "${WC_MODS[@]}"
327-
do
328-
cp "old-tree/$CRYPT_SRC_PATH/${MOD}.c" "$CRYPT_SRC_PATH"
329-
cp "old-tree/$CRYPT_INC_PATH/${MOD}.h" "$CRYPT_INC_PATH"
330-
done
331-
332-
# We are using random.c from a separate release.
333-
# This is forcefully overwriting any other checkout of the cyassl sources.
334-
# Removing this as default behavior for SGX and netos projects.
335-
if [ "$CAVP_SELFTEST_ONLY" == "no" ] && [ "$FLAVOR" != "sgx" ] && \
336-
[ "$FLAVOR" != "netos-7.6" ];
337-
then
338-
pushd old-tree || exit 2
339-
$GIT fetch origin "$RNG_VERSION" || exit $?
340-
$GIT checkout FETCH_HEAD || exit $?
341-
popd || exit 2
342-
cp "old-tree/$CRYPT_SRC_PATH/random.c" "$CRYPT_SRC_PATH"
343-
cp "old-tree/$CRYPT_INC_PATH/random.h" "$CRYPT_INC_PATH"
344-
fi
345-
;;
346-
347180
v2|rand|v5*)
348181
$GIT branch --no-track "my$CRYPT_VERSION" "$CRYPT_VERSION" || exit $?
349182
# Checkout the fips versions of the wolfCrypt files from the repo.

0 commit comments

Comments
 (0)