From 242e9272e5b3f480cd1ab231368a3bc6e61d1e15 Mon Sep 17 00:00:00 2001 From: Zhanna Tsitkov Date: Tue, 3 May 2011 14:25:11 +0000 Subject: [PATCH] API documentation: added a usage example for krb5_verify_init_creds function family git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24912 dc483132-0cff-0310-8789-dd5450dbe970 --- doc/doxy_examples/verify_init_creds.c | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 doc/doxy_examples/verify_init_creds.c diff --git a/doc/doxy_examples/verify_init_creds.c b/doc/doxy_examples/verify_init_creds.c new file mode 100644 index 000000000..c22e25284 --- /dev/null +++ b/doc/doxy_examples/verify_init_creds.c @@ -0,0 +1,28 @@ +/** @example verify_init_creds.c + * + * Usage example for krb5_verify_init_creds function family + */ +#include "k5-int.h" + +krb5_error_code +func(krb5_context context, krb5_creds *creds, krb5_principal server_principal) +{ + krb5_error_code ret = KRB5_OK; + krb5_verify_init_creds_opt options; + + krb5_verify_init_creds_opt_init (&options); + krb5_verify_init_creds_opt_set_ap_req_nofail (&options, 1); + + ret = krb5_verify_init_creds(context, + creds, + server_principal, + NULL /* use default keytab */, + NULL /* don't store creds in ccache */, + &options); + if (ret) { + /* error while verifying credentials for server */ + } + + return ret; +} + -- 2.26.2