Debian Codegraph @

crt/s2n/tests/sidetrail/working/s2n-cbc/copy_as_needed.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License").
5 # You may not use this file except in compliance with the License.
6 # A copy of the License is located at
7 #
8 # http://aws.amazon.com/apache2.0
9 #
10 # or in the "license" file accompanying this file. This file is distributed
11 # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 # express or implied. See the License for the specific language governing
13 # permissions and limitations under the License.
14 #
15
16 set -x
17 set -e
18
19 BASEDIR=$(pwdscip-shell system . . pwd.)
20 echoscip-shell system . . echo. $BASEDIR
21 S2N_BASE="$BASEDIR/../../../.."
22 echoscip-shell system . . echo. $S2N_BASE
23
24 cd $BASEDIR
25 mkdirscip-shell system . . mkdir. -p crypto
26 #The hmac should be based off the old hmac, so just apply the patches to add the invariants
27 cpscip-shell system . . cp. $S2N_BASE/crypto/s2n_hmac.c crypto/
28 cpscip-shell system . . cp. $S2N_BASE/crypto/s2n_hmac.h crypto/
29 patchscip-shell system . . patch. -p5 < ../patches/hmac.patch
30
31 #the hash uses my stubs for now, so replace the file
32 cpscip-shell system . . cp. stubs/s2n_hash.c crypto/
33 cpscip-shell system . . cp. stubs/s2n_hash.h crypto/
34
35 mkdirscip-shell system . . mkdir. -p error
36 cpscip-shell system . . cp. ../stubs/s2n_errno.c error/
37
38 mkdirscip-shell system . . mkdir. -p tls
39 #add invariants etc needed for the proof to the s2n_cbc code
40 cpscip-shell system . . cp. $S2N_BASE/tls/s2n_cbc.c tls/
41 patchscip-shell system . . patch. -p5 < ../patches/cbc.patch
42
43 mkdirscip-shell system . . mkdir. -p utils
44 cpscip-shell system . . cp. $S2N_BASE/utils/s2n_safety.c utils/
45 patchscip-shell system . . patch. -p1 < ../patches/safety.patch
46
47 cpscip-shell system . . cp. ../stubs/s2n_annotations.h utils/
48 cpscip-shell system . . cp. ../stubs/s2n_ensure.h utils/
49 cpscip-shell system . . cp. ../stubs/s2n_ensure.c utils/