summaryrefslogtreecommitdiffstats
path: root/src/tests/gssapi/t_gssapi.py
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-09-17 14:42:46 -0400
committerGreg Hudson <ghudson@mit.edu>2012-09-17 14:42:46 -0400
commit5b624ab7388c17cfeae040aa41d0bfc74eca1fc1 (patch)
tree0df0ce64ff79b6075819a6364ae4507849144fea /src/tests/gssapi/t_gssapi.py
parent56feee187579905c9101b0cdbdd8c6a850adcfc9 (diff)
downloadkrb5-5b624ab7388c17cfeae040aa41d0bfc74eca1fc1.tar.gz
krb5-5b624ab7388c17cfeae040aa41d0bfc74eca1fc1.tar.xz
krb5-5b624ab7388c17cfeae040aa41d0bfc74eca1fc1.zip
Add tests for gss_inquire_mechs_for_name
Diffstat (limited to 'src/tests/gssapi/t_gssapi.py')
-rwxr-xr-xsrc/tests/gssapi/t_gssapi.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tests/gssapi/t_gssapi.py b/src/tests/gssapi/t_gssapi.py
index b21380f08b..e453b7170a 100755
--- a/src/tests/gssapi/t_gssapi.py
+++ b/src/tests/gssapi/t_gssapi.py
@@ -172,4 +172,17 @@ output = realm.run_as_client(['./t_export_name', '-s', 'p:a@b'])
if output != '0401000806062B060105050200000003614062\n':
fail('Unexpected output from t_export_name (SPNEGO krb5 principal)')
+# Test gss_inquire_mechs_for_name behavior.
+krb5_mech = '{ 1 2 840 113554 1 2 2 }'
+spnego_mech = '{ 1 3 6 1 5 5 2 }'
+out = realm.run_as_client(['./t_inq_mechs_name', 'p:a@b'])
+if krb5_mech not in out:
+ fail('t_inq_mechs_name (principal)')
+out = realm.run_as_client(['./t_inq_mechs_name', 'u:x'])
+if krb5_mech not in out or spnego_mech not in out:
+ fail('t_inq_mecs_name (user)')
+out = realm.run_as_client(['./t_inq_mechs_name', 'h:host'])
+if krb5_mech not in out or spnego_mech not in out:
+ fail('t_inq_mecs_name (hostbased)')
+
success('GSSAPI tests')