#ifdef PKINIT
pk_client_params *pkp = NULL;
#endif
+ const EncryptionKey *pk_reply_key = NULL;
memset(&rep, 0, sizeof(rep));
memset(&session_key, 0, sizeof(session_key));
copy_HostAddresses(et.caddr, ek.caddr);
}
-#if PKINIT
+#ifdef PKINIT
if (pkp) {
e_text = "Failed to build PK-INIT reply";
ret = _kdc_pk_mk_pa_reply(context, config, pkp, client,
if (ret)
goto out;
+ /*
+ * Send reply key as constant value to pac generate which allows
+ * parts of the buffer to be encrypted (i.e., PAC_CREDENTIAL_DATA).
+ */
+ pk_reply_key = reply_key;
} else
#endif
{
krb5_pac p = NULL;
krb5_data data;
- ret = _kdc_pac_generate(context, client, &p);
+ ret = _kdc_pac_generate(context, client, pk_reply_key, &p);
if (ret) {
kdc_log(context, config, 0, "PAC generation failed for -- %s",
client_name);
krb5_free_error_message(context, msg);
goto out;
}
- ret = _kdc_pac_generate(context, s4u2self_impersonated_client, &p);
+ ret = _kdc_pac_generate(context, s4u2self_impersonated_client, NULL, &p);
if (ret) {
kdc_log(context, config, 0, "PAC generation failed for -- %s",
tpn);
krb5_error_code
_kdc_pac_generate(krb5_context context,
hdb_entry_ex *client,
+ const krb5_keyblock *pk_reply_key,
krb5_pac *pac)
{
*pac = NULL;
if (windcft == NULL)
return 0;
+ if (windcft->pac_pk_generate != NULL && pk_reply_key != NULL)
+ return (windcft->pac_pk_generate)(windcctx, context,
+ client, pk_reply_key, pac);
return (windcft->pac_generate)(windcctx, context, client, pac);
}
typedef krb5_error_code
(*krb5plugin_windc_pac_generate)(void *, krb5_context,
- struct hdb_entry_ex *, krb5_pac *);
+ struct hdb_entry_ex *, /* client */
+ krb5_pac *);
+
+typedef krb5_error_code
+(*krb5plugin_windc_pac_pk_generate)(void *, krb5_context,
+ struct hdb_entry_ex *, /* client */
+ const krb5_keyblock *, /* pk_replykey */
+ krb5_pac *);
typedef krb5_error_code
(*krb5plugin_windc_pac_verify)(void *, krb5_context,
krb5plugin_windc_pac_generate pac_generate;
krb5plugin_windc_pac_verify pac_verify;
krb5plugin_windc_client_access client_access;
+ krb5plugin_windc_pac_pk_generate pac_pk_generate;
} krb5plugin_windc_ftable;
#endif /* HEIMDAL_KRB5_PAC_PLUGIN_H */