/** Basil 5.1 'Socket' element */ void eh_socket_5_1(struct ud *ud, const XML_Char **attrs) { char *attribs[] = { "ordinal", "architecture", "clock_mhz" }; extract_attributes(attrs, attribs, ARRAY_SIZE(attribs)); #if 0 if (atou64(attribs[0], &ud->bp->mdata.inv->sched_change_count) < 0) fatal("illegal sched_change_count = %s", attribs[0]); #endif ud->counter[BT_SEGMARRAY] = 0; }
/** Basil 5.1 'Compute' element */ void eh_compute_5_1(struct ud *ud, const XML_Char **attrs) { char *attribs[] = { "ordinal" }; extract_attributes(attrs, attribs, ARRAY_SIZE(attribs)); #if 0 if (atou64(attribs[0], &ud->bp->mdata.inv->sched_change_count) < 0) fatal("illegal sched_change_count = %s", attribs[0]); #endif /* As a ProcessArray element is now a child of a ComputeUnit element, the ComputeUnit handler must clear its counter. */ ud->counter[BT_PROCARRAY] = 0; }
err_t scep_parse_response(chunk_t response, chunk_t transID, pkcs7_t **data, scep_attributes_t *attrs, certificate_t *signer_cert) { pkcs7_t *pkcs7; pkcs7 = pkcs7_create_from_chunk(response, 0); if (!pkcs7 || !pkcs7->parse_signedData(pkcs7, signer_cert)) { DESTROY_IF(pkcs7); return "error parsing the scep response"; } extract_attributes(pkcs7, attrs); if (!chunk_equals(transID, attrs->transID)) { pkcs7->destroy(pkcs7); return "transaction ID of scep response does not match"; } *data = pkcs7; return NULL; }
/** Basil 5.1 'NodeArray' element */ void eh_node_array_5_1(struct ud *ud, const XML_Char **attrs) { char *attribs[] = { "schedchangecount" }; /* * The 'schedchangecount' attribute is new in Basil * 1.3/5.1. Quoting Basil 1.3 documentation: * To properly support the usage model suggested in item 10, * below, it is necessary to add the schedchangecount * attribute to the response to a QUERY(INVENTORY) reqest as well. */ eh_node_array_4_0(ud, attrs); extract_attributes(attrs, attribs, ARRAY_SIZE(attribs)); if (atou64(attribs[0], &ud->bp->mdata.inv->sched_change_count) < 0) fatal("illegal sched_change_count = %s", attribs[0]); if ( ud->bp->mdata.inv->sched_change_count > ud->bp->mdata.inv->change_count) fatal("illegal sched_change_count = %"PRIu64", must be " "< change_count (%"PRIu64")", ud->bp->mdata.inv->sched_change_count, ud->bp->mdata.inv->change_count); }