#
# Copyright (C) 2005-2007, 2011, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $Id: tests.sh,v 1.7 2011/11/06 23:46:40 tbox Exp $
#
# Shared secrets.
#
md5="97rnFx24Tfna4mHPfgnerA=="
sha1="FrSt77yPTFx6hTs4i2tKLB9LmE0="
sha224="hXfwwwiag2QGqblopofai9NuW28q/1rH4CaTnA=="
sha256="R16NojROxtxH/xbDl//ehDsHm5DjWTQ2YXV+hGC2iBY="
sha384="OaDdoAk2LAcLtYeUnsT7A9XHjsb6ZEma7OCvUpMraQIJX6HetGrlKmF7yglO1G2h"
sha512="jI/Pa4qRu96t76Pns5Z/Ndxbn3QCkwcxLOgt9vgvnJw5wqTRvNyk3FtD6yIMd1dWVlqZ+Y4fe6Uasc0ckctEmg=="
status=0
echo "I:fetching using hmac-md5 (old form)"
ret=0
fi
echo "I:fetching using hmac-md5 (new form)"
ret=0
fi
echo "I:fetching using hmac-sha1"
ret=0
fi
echo "I:fetching using hmac-sha224"
ret=0
fi
echo "I:fetching using hmac-sha256"
ret=0
fi
echo "I:fetching using hmac-sha384"
ret=0
fi
echo "I:fetching using hmac-sha512"
ret=0
fi
#
#
# Truncated TSIG
#
#
echo "I:fetching using hmac-md5 (trunc)"
ret=0
fi
echo "I:fetching using hmac-sha1 (trunc)"
ret=0
fi
echo "I:fetching using hmac-sha224 (trunc)"
ret=0
fi
echo "I:fetching using hmac-sha256 (trunc)"
ret=0
fi
echo "I:fetching using hmac-sha384 (trunc)"
ret=0
fi
echo "I:fetching using hmac-sha512-256 (trunc)"
ret=0
fi
#
#
# Check for bad truncation.
#
#
echo "I:fetching using hmac-md5-80 (BADTRUNC)"
ret=0
fi
echo "I:fetching using hmac-sha1-80 (BADTRUNC)"
ret=0
fi
echo "I:fetching using hmac-sha224-112 (BADTRUNC)"
ret=0
fi
echo "I:fetching using hmac-sha256-128 (BADTRUNC)"
ret=0
fi
echo "I:fetching using hmac-sha384-192 (BADTRUNC)"
ret=0
fi
echo "I:fetching using hmac-sha512-256 (BADTRUNC)"
ret=0
fi
echo "I:attempting fetch with bad tsig algorithm"
ret=0
grep -i "Couldn't create key invalid: algorithm is unsupported" dig.out.badalgo > /dev/null || ret=1
fi
echo "I:checking both OPT and TSIG records are returned when TC=1"
ret=0
fi
echo "I:check that multiple dnssec-keygen calls don't emit dns_dnssec_findmatchingkeys warning"
ret=0
fi
echo "I:exit status: $status"