krb5_int64 pac_nt_authtime;
krb5_principal pac_principal;
- ret = k5_pac_locate_buffer(context, pac, PAC_CLIENT_INFO, &client_info);
+ ret = k5_pac_locate_buffer(context, pac, KRB5_PAC_CLIENT_INFO,
+ &client_info);
if (ret != 0)
return ret;
PAC_INFO_BUFFER *buffer = NULL;
size_t i;
- assert(type == PAC_SERVER_CHECKSUM || type == PAC_PRIVSVR_CHECKSUM);
+ assert(type == KRB5_PAC_SERVER_CHECKSUM ||
+ type == KRB5_PAC_PRIVSVR_CHECKSUM);
assert(data->length >= pac->data.length);
for (i = 0; i < pac->pac->cBuffers; i++) {
krb5_boolean valid;
krb5_octet *p;
- ret = k5_pac_locate_buffer(context, pac,
- PAC_SERVER_CHECKSUM, &checksum_data);
+ ret = k5_pac_locate_buffer(context, pac, KRB5_PAC_SERVER_CHECKSUM,
+ &checksum_data);
if (ret != 0)
return ret;
memcpy(pac_data.data, pac->data.data, pac->data.length);
/* Zero out both checksum buffers */
- ret = k5_pac_zero_signature(context, pac,
- PAC_SERVER_CHECKSUM, &pac_data);
+ ret = k5_pac_zero_signature(context, pac, KRB5_PAC_SERVER_CHECKSUM,
+ &pac_data);
if (ret != 0) {
free(pac_data.data);
return ret;
}
- ret = k5_pac_zero_signature(context, pac,
- PAC_PRIVSVR_CHECKSUM, &pac_data);
+ ret = k5_pac_zero_signature(context, pac, KRB5_PAC_PRIVSVR_CHECKSUM,
+ &pac_data);
if (ret != 0) {
free(pac_data.data);
return ret;
krb5_boolean valid;
krb5_octet *p;
- ret = k5_pac_locate_buffer(context, pac,
- PAC_PRIVSVR_CHECKSUM, &privsvr_checksum);
+ ret = k5_pac_locate_buffer(context, pac, KRB5_PAC_PRIVSVR_CHECKSUM,
+ &privsvr_checksum);
if (ret != 0)
return ret;
if (privsvr_checksum.length < PAC_SIGNATURE_DATA_LENGTH)
return KRB5_BAD_MSIZE;
- ret = k5_pac_locate_buffer(context, pac,
- PAC_SERVER_CHECKSUM, &server_checksum);
+ ret = k5_pac_locate_buffer(context, pac, KRB5_PAC_SERVER_CHECKSUM,
+ &server_checksum);
if (ret != 0)
return ret;
krb5_ui_4 type;
krb5_data attribute;
} mspac_attribute_types[] = {
- { (krb5_ui_4)-1, { KV5M_DATA, STRLENOF("urn:mspac:"), "urn:mspac:" } },
- { PAC_LOGON_INFO, { KV5M_DATA, STRLENOF("urn:mspac:logon-info"), "urn:mspac:logon-info" } },
- { PAC_CREDENTIALS_INFO, { KV5M_DATA, STRLENOF("urn:mspac:credentials-info"), "urn:mspac:credentials-info" } },
- { PAC_SERVER_CHECKSUM, { KV5M_DATA, STRLENOF("urn:mspac:server-checksum"), "urn:mspac:server-checksum" } },
- { PAC_PRIVSVR_CHECKSUM, { KV5M_DATA, STRLENOF("urn:mspac:privsvr-checksum"), "urn:mspac:privsvr-checksum" } },
- { PAC_CLIENT_INFO, { KV5M_DATA, STRLENOF("urn:mspac:client-info"), "urn:mspac:client-info" } },
- { PAC_DELEGATION_INFO, { KV5M_DATA, STRLENOF("urn:mspac:delegation-info"), "urn:mspac:delegation-info" } },
- { PAC_UPN_DNS_INFO, { KV5M_DATA, STRLENOF("urn:mspac:upn-dns-info"), "urn:mspac:upn-dns-info" } },
+ { (krb5_ui_4)-1, { KV5M_DATA, STRLENOF("urn:mspac:"),
+ "urn:mspac:" } },
+ { KRB5_PAC_LOGON_INFO, { KV5M_DATA,
+ STRLENOF("urn:mspac:logon-info"),
+ "urn:mspac:logon-info" } },
+ { KRB5_PAC_CREDENTIALS_INFO, { KV5M_DATA,
+ STRLENOF("urn:mspac:credentials-info"),
+ "urn:mspac:credentials-info" } },
+ { KRB5_PAC_SERVER_CHECKSUM, { KV5M_DATA,
+ STRLENOF("urn:mspac:server-checksum"),
+ "urn:mspac:server-checksum" } },
+ { KRB5_PAC_PRIVSVR_CHECKSUM, { KV5M_DATA,
+ STRLENOF("urn:mspac:privsvr-checksum"),
+ "urn:mspac:privsvr-checksum" } },
+ { KRB5_PAC_CLIENT_INFO, { KV5M_DATA,
+ STRLENOF("urn:mspac:client-info"),
+ "urn:mspac:client-info" } },
+ { KRB5_PAC_DELEGATION_INFO, { KV5M_DATA,
+ STRLENOF("urn:mspac:delegation-info"),
+ "urn:mspac:delegation-info" } },
+ { KRB5_PAC_UPN_DNS_INFO, { KV5M_DATA,
+ STRLENOF("urn:mspac:upn-dns-info"),
+ "urn:mspac:upn-dns-info" } },
};
#define MSPAC_ATTRIBUTE_COUNT (sizeof(mspac_attribute_types)/sizeof(mspac_attribute_types[0]))
krb5_ui_8 nt_authtime;
/* If we already have a CLIENT_INFO buffer, then just validate it */
- if (k5_pac_locate_buffer(context, pac,
- PAC_CLIENT_INFO, &client_info) == 0) {
+ if (k5_pac_locate_buffer(context, pac, KRB5_PAC_CLIENT_INFO,
+ &client_info) == 0) {
return k5_pac_validate_client(context, pac, authtime, principal);
}
client_info.length = PAC_CLIENT_INFO_LENGTH + princ_name_ucs2_len;
client_info.data = NULL;
- ret = k5_pac_add_buffer(context, pac, PAC_CLIENT_INFO,
+ ret = k5_pac_add_buffer(context, pac, KRB5_PAC_CLIENT_INFO,
&client_info, TRUE, &client_info);
if (ret != 0)
goto cleanup;
}
/* Create zeroed buffers for both checksums */
- ret = k5_insert_checksum(context, pac, PAC_SERVER_CHECKSUM,
+ ret = k5_insert_checksum(context, pac, KRB5_PAC_SERVER_CHECKSUM,
server_key, &server_cksumtype);
if (ret != 0)
return ret;
- ret = k5_insert_checksum(context, pac, PAC_PRIVSVR_CHECKSUM,
+ ret = k5_insert_checksum(context, pac, KRB5_PAC_PRIVSVR_CHECKSUM,
privsvr_key, &privsvr_cksumtype);
if (ret != 0)
return ret;
return ret;
/* Generate the server checksum over the entire PAC */
- ret = k5_pac_locate_buffer(context, pac,
- PAC_SERVER_CHECKSUM, &server_cksum);
+ ret = k5_pac_locate_buffer(context, pac, KRB5_PAC_SERVER_CHECKSUM,
+ &server_cksum);
if (ret != 0)
return ret;
return ret;
/* Generate the privsvr checksum over the server checksum buffer */
- ret = k5_pac_locate_buffer(context, pac,
- PAC_PRIVSVR_CHECKSUM, &privsvr_cksum);
+ ret = k5_pac_locate_buffer(context, pac, KRB5_PAC_PRIVSVR_CHECKSUM,
+ &privsvr_cksum);
if (ret != 0)
return ret;