# Generate encrypted private key and self signed certificate:
# (Skip this step if you already have a key and a certificate)

mkdir certs
openssl genrsa -des3 -out certs/enc_key.pem 1024
openssl req -new -subj '/C=TR/ST=Kocaeli/L=Gebze/CN=Pardus' -key certs/enc_key.pem -out certs/req.pem
openssl req -x509 -key certs/enc_key.pem -in certs/req.pem -out certs/cert.pem -days 365

# Feel free to share 'certs/cert.pem' and 'certs/pub_key.pem' with anyone, keep others to yourself.

# Create a test file:

mkdir -p dummy/a/b/c
echo "abc" > dummy/test.txt
echo "123" > dummy/a/test.txt
echo "ABC" > dummy/a/b/test.txt
echo "^+%" > dummy/a/b/c/test.txt
zip -r test.zip dummy
rm -rf dummy
cp test.zip test2.zip

# Sign ZIP files:

./inarygn.py sign certs/enc_key.pem test.zip test2.zip abc.txt
Password: <Enter password>

# Make a directory for trusted certificates:

mkdir certs_trusted/
cp certs/cert.pem certs_trusted/

# Verify ZIP files:

./inarygn.py verify certs_trusted/ test.zip test2.zip abc.txt

# Change *.zip contents and try to verify again.
# Clear cert_trusted/ directory and try again.
