summaryrefslogtreecommitdiffstats
path: root/src/tests/gssapi/t_gssapi.py
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-01-16 11:49:55 -0500
committerGreg Hudson <ghudson@mit.edu>2014-01-17 15:58:08 -0500
commit6f8d5135334c9ddb674f9824e750872b3b0642ea (patch)
treea34146de5fab317d06c9c297b243fdcc548c88af /src/tests/gssapi/t_gssapi.py
parent970304b558a360e08d8421ef92245d2df0ac5e49 (diff)
downloadkrb5-6f8d5135334c9ddb674f9824e750872b3b0642ea.tar.gz
krb5-6f8d5135334c9ddb674f9824e750872b3b0642ea.tar.xz
krb5-6f8d5135334c9ddb674f9824e750872b3b0642ea.zip
Add test for gss_acquire_cred_from rcache feature
Diffstat (limited to 'src/tests/gssapi/t_gssapi.py')
-rwxr-xr-xsrc/tests/gssapi/t_gssapi.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/gssapi/t_gssapi.py b/src/tests/gssapi/t_gssapi.py
index 74139e464e..106910d8f6 100755
--- a/src/tests/gssapi/t_gssapi.py
+++ b/src/tests/gssapi/t_gssapi.py
@@ -91,6 +91,15 @@ realm.kinit(service_cs, None, ['-k', '-t', servicekeytab])
realm.run(['./t_credstore', '-s', 'p:' + service_cs, 'ccache', storagecache,
'keytab', servicekeytab])
+# Test rcache feature of cred stores. t_credstore -r should produce a
+# replay error normally, but not with rcache set to "none:".
+output = realm.run(['./t_credstore', '-r', '-a', 'p:' + realm.host_princ],
+ expected_code=1)
+if 'gss_accept_sec_context(2): Request is a replay' not in output:
+ fail('Expected replay error not seen in t_credstore output')
+realm.run(['./t_credstore', '-r', '-a', 'p:' + realm.host_princ,
+ 'rcache', 'none:'])
+
# Verify that we can't acquire acceptor creds without a keytab.
os.remove(realm.keytab)
output = realm.run(['./t_accname', 'p:abc'], expected_code=1)