File: cavp

package info (click to toggle)
libreswan 5.2-2.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 81,656 kB
  • sloc: ansic: 129,988; sh: 32,018; xml: 20,646; python: 10,303; makefile: 3,022; javascript: 1,506; sed: 574; yacc: 511; perl: 264; awk: 52
file content (26 lines) | stat: -rwxr-xr-x 642 bytes parent folder | download | duplicates (4)
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
#!/bin/bash

set -e

tests=()

if [ -x "$(pwd)debian/libreswan/usr/libexec/ipsec/cavp" ] ; then
    cavp="$(pwd)debian/libreswan/usr/libexec/ipsec/cavp" 
    echo "Testing built CAVP binary: $cavp"
else
    cavp=/usr/libexec/ipsec/cavp
    echo "Testing installed CAVP binary: $cavp"
fi

workdir=$(mktemp -d)
cd "$workdir"

wget --quiet https://download.libreswan.org/cavs/{ikev1_dsa,ikev1_psk,ikev2}.fax.bz2
bunzip2 *.fax.bz2

"$cavp" -v2 ikev2.fax | diff -u ikev2.fax - > /dev/null
"$cavp" -v1dsa ikev1_dsa.fax | diff -u ikev1_dsa.fax - > /dev/null
"$cavp" -v1psk ikev1_psk.fax | diff -u ikev1_psk.fax - > /dev/null

cd -
rm -rf "$workdir"