#!/bin/sh
set -e

# change directory to $AUTOPKGTEST_TMP
cd "${AUTOPKGTEST_TMP}"

cleanup() {
  ex=$?
  rm -rf keys config
  exit "${ex}"
}
trap "cleanup" EXIT TERM INT

rm -rf keys config
mkdir -p keys config
echo 624 > config/pqcport
echo 584 > config/keyport

pqconnect-keygen -c config -d keys
pqconnect-keygen -c config -d keys -D

exit 0
