diff options
Diffstat (limited to 'fuzz/harnesses/assert-rsa-h-p')
-rwxr-xr-x | fuzz/harnesses/assert-rsa-h-p | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/fuzz/harnesses/assert-rsa-h-p b/fuzz/harnesses/assert-rsa-h-p new file mode 100755 index 0000000..8eb9ea6 --- /dev/null +++ b/fuzz/harnesses/assert-rsa-h-p | |||
@@ -0,0 +1,33 @@ | |||
1 | #!/bin/bash -u | ||
2 | # Copyright (c) 2019 Yubico AB. All rights reserved. | ||
3 | # Use of this source code is governed by a BSD-style | ||
4 | # license that can be found in the LICENSE file. | ||
5 | |||
6 | T=assert-rsa-h-p | ||
7 | |||
8 | sync() { | ||
9 | mkdir ${T} | ||
10 | ssh "${REMOTE}" "cd ${T}/afl-out && tar -cf- queue ../pubkey ../hmac-salt" | \ | ||
11 | tar -C ${T} -xf- | ||
12 | } | ||
13 | |||
14 | run() { | ||
15 | find ${T}/queue -type f | while read f; do | ||
16 | cat "${f}" | LD_PRELOAD=${PRELOAD} build/examples/assert \ | ||
17 | -t rsa -h ${T}/hmac-out -s ${T}/hmac-salt \ | ||
18 | -p ${T}/pubkey nodev 2>/dev/null 1>&2 | ||
19 | done | ||
20 | } | ||
21 | |||
22 | case "$1" in | ||
23 | sync) | ||
24 | sync | ||
25 | ;; | ||
26 | run) | ||
27 | run | ||
28 | exit 0 | ||
29 | ;; | ||
30 | *) | ||
31 | echo unknown command "$1" | ||
32 | exit 1 | ||
33 | esac | ||