Make sure we don't sent both ENC-TS and PK-INIT pa data, no need to

expose our password protecting our PKCS12 key.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19776 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2007-01-09 10:44:59 +00:00
parent 2230b87e17
commit 69c37b6cc7

View File

@@ -1092,7 +1092,18 @@ process_pa_data_to_md(krb5_context context,
(*out_md)->len = 0;
(*out_md)->val = NULL;
if (in_md->len != 0) {
/*
* Make sure we don't sent both ENC-TS and PK-INIT pa data, no
* need to expose our password protecting our PKCS12 key.
*/
if (ctx->pk_init_ctx) {
ret = pa_data_to_md_pkinit(context, a, creds->client, ctx, *out_md);
if (ret)
return ret;
} else if (in_md->len != 0) {
struct pa_info_data paid, *ppaid;
memset(&paid, 0, sizeof(paid));
@@ -1106,9 +1117,6 @@ process_pa_data_to_md(krb5_context context,
}
pa_data_add_pac_request(context, ctx, *out_md);
ret = pa_data_to_md_pkinit(context, a, creds->client, ctx, *out_md);
if (ret)
return ret;
if ((*out_md)->len == 0) {
free(*out_md);