summaryrefslogtreecommitdiff
path: root/tests/toolbox.inc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/toolbox.inc.sh')
-rw-r--r--tests/toolbox.inc.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/toolbox.inc.sh b/tests/toolbox.inc.sh
index ef7b691..63175d9 100644
--- a/tests/toolbox.inc.sh
+++ b/tests/toolbox.inc.sh
@@ -1380,6 +1380,28 @@ function pinstantiate_key ()
###############################################################################
#
+# reject a key
+#
+###############################################################################
+function reject_key ()
+{
+ my_exitval=0
+ if [ "x$1" = "x--fail" ]
+ then
+ my_exitval=1
+ shift
+ fi
+
+ echo keyctl reject "$@" >>$OUTPUTFILE
+ keyctl reject "$@" >>$OUTPUTFILE 2>&1
+ if [ $? != $my_exitval ]
+ then
+ failed
+ fi
+}
+
+###############################################################################
+#
# negate a key
#
###############################################################################