#!/bin/sh
export PGPPATH=.
export PGPPASS=testpass

for xa in 0 3 1; do
for ya in 1 2 3; do
for a in 1 2 3; do
  for za in 1 2 3; do
    echo testing conv-key only a C:$a S:$xa H:$ya SC:$za
    ./minipgp5 -x $xa -y $ya -s $za -a $a -C -p $PGPPASS <README >cvt.one
    ./minipgp5 -m "MESSAGE" <cvt.one >cvt1.asc
    ./minipgp5 -p $PGPPASS <cvt.one | diff README - | head
    pgpv cvt1.asc -o cvtv.one
    diff README cvtv.one
    rm cvtv.one cvt.one cvt1.asc
  done
    echo testing conv only a C:$a S:$xa H:$ya
    ./minipgp5 -x $xa -y $ya -s $a -a $a -c -p $PGPPASS <README >cvt.two
    ./minipgp5 -m "MESSAGE" <cvt.two >cvt2.asc
    ./minipgp5 -p $PGPPASS <cvt.two | diff README - | head
    pgpv cvt2.asc -o cvtv.two
    diff README cvtv.two
    rm -f cvtv.two cvt.two cvt2.asc
done
done
done
