From fa304162dbe273dcab994cb73d25f34c2421fded Mon Sep 17 00:00:00 2001 From: =?utf8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Wed, 23 Nov 2011 09:43:56 -0800 Subject: [PATCH] test rsa mode too --- kdc/kdc-tester.c | 6 +++++- tests/kdc/kdc-tester4.json.in | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/kdc/kdc-tester.c b/kdc/kdc-tester.c index e503a2527..2a3f84e94 100644 --- a/kdc/kdc-tester.c +++ b/kdc/kdc-tester.c @@ -186,10 +186,14 @@ eval_kinit(heim_dict_t o) krb5_err(kdc_context, 1, ret, "krb5_get_init_creds_opt_alloc"); if (pk_user_id) { + heim_bool_t rsaobj = heim_dict_get_value(o, HSTR("pkinit-use-rsa")); + int use_rsa = rsaobj ? heim_bool_val(rsaobj) : 0; + ret = krb5_get_init_creds_opt_set_pkinit(kdc_context, opt, client, heim_string_get_utf8(pk_user_id), - NULL, NULL, NULL, 0, + NULL, NULL, NULL, + use_rsa ? 2 : 0, NULL, NULL, NULL); if (ret) krb5_err(kdc_context, 1, ret, "krb5_get_init_creds_opt_set_pkinit"); diff --git a/tests/kdc/kdc-tester4.json.in b/tests/kdc/kdc-tester4.json.in index eda9b2236..0cbc33731 100644 --- a/tests/kdc/kdc-tester4.json.in +++ b/tests/kdc/kdc-tester4.json.in @@ -7,6 +7,16 @@ "client" : "foo@TEST.H5L.SE", "pkinit-user-cert-id" : "FILE:@top_srcdir@/lib/hx509/data/pkinit.crt,@top_srcdir@/lib/hx509/data/pkinit.key" } + }, + { + "op" : "repeat", + "num" : 333, + "value" : { + "op" : "kinit", + "client" : "foo@TEST.H5L.SE", + "pkinit-user-cert-id" : "FILE:@top_srcdir@/lib/hx509/data/pkinit.crt,@top_srcdir@/lib/hx509/data/pkinit.key", + "pkinit-use-rsa" : true + } } ] -- 2.11.4.GIT