move back init_as_req when building packet

This commit is contained in:
Love Hornquist Astrand
2011-05-08 15:56:20 -07:00
committed by Love Hörnquist Åstrand
parent 4f3d3723f4
commit 16d16588d2

View File

@@ -1385,13 +1385,6 @@ krb5_init_creds_init(krb5_context context,
ctx->prompter = prompter;
ctx->prompter_data = prompter_data;
ret = init_as_req(context, ctx->flags, &ctx->cred,
ctx->addrs, ctx->etypes, &ctx->as_req);
if (ret) {
free_init_creds_ctx(context, ctx);
return ret;
}
*rctx = ctx;
return ret;
@@ -1668,6 +1661,15 @@ krb5_init_creds_step(krb5_context context,
krb5_data_zero(out);
if (ctx->as_req.req_body.cname == NULL) {
ret = init_as_req(context, ctx->flags, &ctx->cred,
ctx->addrs, ctx->etypes, &ctx->as_req);
if (ret) {
free_init_creds_ctx(context, ctx);
return ret;
}
}
#define MAX_PA_COUNTER 10
if (ctx->pa_counter > MAX_PA_COUNTER) {
krb5_set_error_message(context, KRB5_GET_IN_TKT_LOOP,