#
# Copyright (C) 2005-2007, 2011, 2012 Internet Systems Consortium, Inc. ("ISC")
#
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id$
#
# 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
exit $status