0,
};
-static int conf_boolean(char *s)
+static int
+conf_boolean(char *s)
{
const char * const *p;
for(p=conf_yes; *p; p++) {
return 0;
}
-static krb5_error_code appdefault_get(krb5_context context, const char *appname, const krb5_data *realm, const char *option, char **ret_value)
+static krb5_error_code
+appdefault_get(krb5_context context, const char *appname, const krb5_data *realm, const char *option, char **ret_value)
{
profile_t profile;
const char *names[5];
size_t length;
};
-static krb5_error_code grow_find_authdata
-(krb5_context context, struct find_authdata_context *fctx,
- krb5_authdata *elem)
+static krb5_error_code
+grow_find_authdata(krb5_context context, struct find_authdata_context *fctx,
+ krb5_authdata *elem)
{
krb5_error_code retval = 0;
if (fctx->length == fctx->space) {
return retval;
}
-
-
-
-static krb5_error_code find_authdata_1
-(krb5_context context, krb5_authdata *const *in_authdat, krb5_authdatatype ad_type,
- struct find_authdata_context *fctx)
+static krb5_error_code
+find_authdata_1(krb5_context context, krb5_authdata *const *in_authdat,
+ krb5_authdatatype ad_type, struct find_authdata_context *fctx)
{
int i = 0;
krb5_error_code retval=0;
}
-krb5_error_code krb5int_find_authdata
-(krb5_context context, krb5_authdata *const * ticket_authdata,
- krb5_authdata * const *ap_req_authdata,
- krb5_authdatatype ad_type,
- krb5_authdata ***results)
+krb5_error_code
+krb5int_find_authdata(krb5_context context,
+ krb5_authdata *const *ticket_authdata,
+ krb5_authdata *const *ap_req_authdata,
+ krb5_authdatatype ad_type, krb5_authdata ***results)
{
krb5_error_code retval = 0;
struct find_authdata_context fctx;
#include "int-proto.h"
-static krb5_error_code fast_armor_ap_request
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_ccache ccache, krb5_data *target_realm)
+static krb5_error_code
+fast_armor_ap_request(krb5_context context,
+ struct krb5int_fast_request_state *state,
+ krb5_ccache ccache, krb5_data *target_realm)
{
krb5_error_code retval = 0;
krb5_creds creds, *out_creds = NULL;
return retval;
}
-krb5_error_code krb5int_fast_as_armor
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_gic_opt_ext *opte,
- krb5_kdc_req *request)
+krb5_error_code
+krb5int_fast_as_armor(krb5_context context,
+ struct krb5int_fast_request_state *state,
+ krb5_gic_opt_ext *opte,
+ krb5_kdc_req *request)
{
krb5_error_code retval = 0;
krb5_ccache ccache = NULL;
krb5_error_code
-krb5int_fast_prep_req (krb5_context context, struct krb5int_fast_request_state *state,
- krb5_kdc_req *request,
- const krb5_data *to_be_checksummed, kdc_req_encoder_proc encoder,
- krb5_data **encoded_request)
+krb5int_fast_prep_req(krb5_context context,
+ struct krb5int_fast_request_state *state,
+ krb5_kdc_req *request,
+ const krb5_data *to_be_checksummed,
+ kdc_req_encoder_proc encoder,
+ krb5_data **encoded_request)
{
krb5_error_code retval = 0;
krb5_pa_data *pa_array[2];
return retval;
}
-static krb5_error_code decrypt_fast_reply
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_pa_data **in_padata,
- krb5_fast_response **response)
+static krb5_error_code
+decrypt_fast_reply(krb5_context context,
+ struct krb5int_fast_request_state *state,
+ krb5_pa_data **in_padata,
+ krb5_fast_response **response)
{
krb5_error_code retval = 0;
krb5_data scratch;
* whenever padata is available (all the time with fast).
*/
krb5_error_code
-krb5int_fast_process_error(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_error **err_replyptr , krb5_pa_data ***out_padata,
+krb5int_fast_process_error(krb5_context context,
+ struct krb5int_fast_request_state *state,
+ krb5_error **err_replyptr,
+ krb5_pa_data ***out_padata,
krb5_boolean *retry)
{
krb5_error_code retval = 0;
}
-krb5_error_code krb5int_fast_process_response
-(krb5_context context, struct krb5int_fast_request_state *state,
- krb5_kdc_rep *resp,
- krb5_keyblock **strengthen_key)
+krb5_error_code
+krb5int_fast_process_response(krb5_context context,
+ struct krb5int_fast_request_state *state,
+ krb5_kdc_rep *resp,
+ krb5_keyblock **strengthen_key)
{
krb5_error_code retval = 0;
krb5_fast_response *fast_response = NULL;
return retval;
}
-krb5_error_code krb5int_fast_reply_key(krb5_context context,
- krb5_keyblock *strengthen_key,
- krb5_keyblock *existing_key,
- krb5_keyblock *out_key)
+krb5_error_code
+krb5int_fast_reply_key(krb5_context context,
+ krb5_keyblock *strengthen_key,
+ krb5_keyblock *existing_key,
+ krb5_keyblock *out_key)
{
krb5_keyblock *key = NULL;
krb5_error_code retval = 0;
free(state);
}
-krb5_pa_data * krb5int_find_pa_data
-(krb5_context context, krb5_pa_data *const *padata, krb5_preauthtype pa_type)
+krb5_pa_data *
+krb5int_find_pa_data(krb5_context context, krb5_pa_data *const *padata,
+ krb5_preauthtype pa_type)
{
krb5_pa_data * const *tmppa;
* This function performs 32 bit bounded addition so we can generate
* lifetimes without overflowing krb5_int32
*/
-static krb5_int32 krb5int_addint32 (krb5_int32 x, krb5_int32 y)
+static krb5_int32
+krb5int_addint32 (krb5_int32 x, krb5_int32 y)
{
if ((x > 0) && (y > (KRB5_INT32_MAX - x))) {
/* sum will be be greater than KRB5_INT32_MAX */
return(ret);
}
-krb5_error_code krb5int_populate_gic_opt (
- krb5_context context, krb5_gic_opt_ext **opte,
- krb5_flags options, krb5_address * const *addrs, krb5_enctype *ktypes,
- krb5_preauthtype *pre_auth_types, krb5_creds *creds)
+
+krb5_error_code
+krb5int_populate_gic_opt(krb5_context context, krb5_gic_opt_ext **opte,
+ krb5_flags options, krb5_address *const *addrs,
+ krb5_enctype *ktypes,
+ krb5_preauthtype *pre_auth_types, krb5_creds *creds)
{
int i;
krb5_int32 starttime;
#include "k5-int.h"
#include <assert.h>
-krb5_error_code KRB5_CALLCONV krb5_init_keyblock
-(krb5_context context, krb5_enctype enctype,
- size_t length, krb5_keyblock **out)
+krb5_error_code KRB5_CALLCONV
+krb5_init_keyblock(krb5_context context, krb5_enctype enctype,
+ size_t length, krb5_keyblock **out)
{
return krb5int_c_init_keyblock (context, enctype, length, out);
}
return d;
}
-static
-krb5_error_code pa_salt(krb5_context context,
- krb5_kdc_req *request,
- krb5_pa_data *in_padata,
- krb5_pa_data **out_padata,
- krb5_data *salt, krb5_data *s2kparams,
- krb5_enctype *etype,
- krb5_keyblock *as_key,
- krb5_prompter_fct prompter, void *prompter_data,
- krb5_gic_get_as_key_fct gak_fct, void *gak_data)
+static krb5_error_code
+pa_salt(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+ krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+ krb5_enctype *etype, krb5_keyblock *as_key, krb5_prompter_fct prompter,
+ void *prompter_data, krb5_gic_get_as_key_fct gak_fct, void *gak_data)
{
krb5_data tmp;
krb5_error_code retval;
return(0);
}
-static
-krb5_error_code pa_fx_cookie(krb5_context context,
- krb5_kdc_req *request,
- krb5_pa_data *in_padata,
- krb5_pa_data **out_padata,
- krb5_data *salt,
- krb5_data *s2kparams,
- krb5_enctype *etype,
- krb5_keyblock *as_key,
- krb5_prompter_fct prompter,
- void *prompter_data,
- krb5_gic_get_as_key_fct gak_fct,
- void *gak_data)
+static krb5_error_code
+pa_fx_cookie(krb5_context context, krb5_kdc_req *request,
+ krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+ krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+ krb5_keyblock *as_key, krb5_prompter_fct prompter,
+ void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+ void *gak_data)
{
krb5_pa_data *pa = calloc(1, sizeof(krb5_pa_data));
krb5_octet *contents;
return 0;
}
-static
-krb5_error_code pa_enc_timestamp(krb5_context context,
- krb5_kdc_req *request,
- krb5_pa_data *in_padata,
- krb5_pa_data **out_padata,
- krb5_data *salt,
- krb5_data *s2kparams,
- krb5_enctype *etype,
- krb5_keyblock *as_key,
- krb5_prompter_fct prompter,
- void *prompter_data,
- krb5_gic_get_as_key_fct gak_fct,
- void *gak_data)
+static krb5_error_code
+pa_enc_timestamp(krb5_context context, krb5_kdc_req *request,
+ krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+ krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+ krb5_keyblock *as_key, krb5_prompter_fct prompter,
+ void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+ void *gak_data)
{
krb5_error_code ret;
krb5_pa_enc_ts pa_enc;
return(0);
}
-static
-char *sam_challenge_banner(krb5_int32 sam_type)
+static char *
+sam_challenge_banner(krb5_int32 sam_type)
{
char *label;
draft. This draft cannot be implemented as written. This code is
compatible with earlier versions of mit krb5 and cygnus kerbnet. */
-static
-krb5_error_code pa_sam(krb5_context context,
- krb5_kdc_req *request,
- krb5_pa_data *in_padata,
- krb5_pa_data **out_padata,
- krb5_data *salt,
- krb5_data *s2kparams,
- krb5_enctype *etype,
- krb5_keyblock *as_key,
- krb5_prompter_fct prompter,
- void *prompter_data,
- krb5_gic_get_as_key_fct gak_fct,
- void *gak_data)
+static krb5_error_code
+pa_sam(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+ krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+ krb5_enctype *etype, krb5_keyblock *as_key, krb5_prompter_fct prompter,
+ void *prompter_data, krb5_gic_get_as_key_fct gak_fct, void *gak_data)
{
krb5_error_code ret;
krb5_data tmpsam;
}
#endif /* APPLE_PKINIT */
-static
-krb5_error_code pa_sam_2(krb5_context context,
- krb5_kdc_req *request,
- krb5_pa_data *in_padata,
- krb5_pa_data **out_padata,
- krb5_data *salt,
- krb5_data *s2kparams,
- krb5_enctype *etype,
- krb5_keyblock *as_key,
- krb5_prompter_fct prompter,
- void *prompter_data,
- krb5_gic_get_as_key_fct gak_fct,
- void *gak_data) {
-
+static krb5_error_code
+pa_sam_2(krb5_context context, krb5_kdc_req *request, krb5_pa_data *in_padata,
+ krb5_pa_data **out_padata, krb5_data *salt, krb5_data *s2kparams,
+ krb5_enctype *etype, krb5_keyblock *as_key,
+ krb5_prompter_fct prompter, void *prompter_data,
+ krb5_gic_get_as_key_fct gak_fct, void *gak_data)
+{
krb5_error_code retval;
krb5_sam_challenge_2 *sc2 = NULL;
krb5_sam_challenge_2_body *sc2b = NULL;
return(0);
}
-static krb5_error_code pa_s4u_x509_user(
- krb5_context context,
- krb5_kdc_req *request,
- krb5_pa_data *in_padata,
- krb5_pa_data **out_padata,
- krb5_data *salt,
- krb5_data *s2kparams,
- krb5_enctype *etype,
- krb5_keyblock *as_key,
- krb5_prompter_fct prompter,
- void *prompter_data,
- krb5_gic_get_as_key_fct gak_fct,
- void *gak_data)
+static krb5_error_code
+pa_s4u_x509_user(krb5_context context, krb5_kdc_req *request,
+ krb5_pa_data *in_padata, krb5_pa_data **out_padata,
+ krb5_data *salt, krb5_data *s2kparams, krb5_enctype *etype,
+ krb5_keyblock *as_key, krb5_prompter_fct prompter,
+ void *prompter_data, krb5_gic_get_as_key_fct gak_fct,
+ void *gak_data)
{
krb5_s4u_userid *userid = (krb5_s4u_userid *)gak_data; /* XXX private contract */
krb5_pa_data *s4u_padata;
assert(memcmp(adc1->contents, adc2->contents, adc1->length) == 0);
}
-int main()
+int
+main()
{
krb5_context context;
krb5_authdata **results;
}
};
-static void show_enctypes(krb5_context ctx, krb5_enctype *list)
+static void
+show_enctypes(krb5_context ctx, krb5_enctype *list)
{
unsigned int i;
fprintf(stderr, "\n");
}
-static void compare(krb5_context ctx, krb5_enctype *result,
- krb5_enctype *expected, const char *profstr,
- krb5_boolean weak)
+static void
+compare(krb5_context ctx, krb5_enctype *result, krb5_enctype *expected,
+ const char *profstr, krb5_boolean weak)
{
unsigned int i;
void test_set_realm (krb5_context, const char *, const char *);
void usage (char *);
-void test_string_to_timestamp(krb5_context ctx, char *ktime)
+void
+test_string_to_timestamp(krb5_context ctx, char *ktime)
{
krb5_timestamp timestamp;
time_t t;
printf("Parsed time was %s", ctime(&t));
}
-void test_425_conv_principal(krb5_context ctx, char *name, char *inst, char *realm)
+void
+test_425_conv_principal(krb5_context ctx, char *name, char *inst, char *realm)
{
krb5_error_code retval;
krb5_principal princ;
krb5_free_principal(ctx, princ);
}
-void test_524_conv_principal(krb5_context ctx, char *name)
+void
+test_524_conv_principal(krb5_context ctx, char *name)
{
krb5_principal princ = 0;
krb5_error_code retval;
krb5_free_principal (ctx, princ);
}
-void test_parse_name(krb5_context ctx, const char *name)
+void
+test_parse_name(krb5_context ctx, const char *name)
{
krb5_error_code retval;
krb5_principal princ = 0, princ2 = 0;
krb5_free_principal(ctx, princ2);
}
-void test_set_realm(krb5_context ctx, const char *name, const char *realm)
+void
+test_set_realm(krb5_context ctx, const char *name, const char *realm)
{
krb5_error_code retval;
krb5_principal princ = 0;
krb5_free_principal(ctx, princ);
}
-void usage(char *progname)
+void
+usage(char *progname)
{
fprintf(stderr, "%s: Usage: %s 425_conv_principal <name> <inst> <realm\n",
progname, progname);