#!/bin/sh

test()
{
	opt="$1"
	target="$2"
	name="$3"

	filebase=testsuite/evsslgetcert-data/"evsslgetcert-$name"
	output="$filebase".out
	packets="$filebase".net
	rm -f "$output" "$packets"
	ATLAS_TESTS=yes ATLAS_UNSAFE=yes ./busybox evsslgetcert $opt -O "$output" -W "$packets" "$target"
}

test "-6" "atlas.ripe.net" "6"
test "-4" "atlas.ripe.net" "4"
test "-6 -A42" "atlas.ripe.net" "A42"
test "-6 -B43 -A42" "atlas.ripe.net" "B43"
test "-6 -h foo.example.com" "atlas.ripe.net" "h"
test "-6 -V TLS1.0 -h www.ripe.net" "www.ripe.net" "TLS1.0"
test "-4 -p 853" "8.8.8.8" "p853"
