* @param[in,out] ndr ndr pull context
* @param[in] ndr_flags
* @param[out] kmi the KeyMaterialInternal structure to populate
- * kmi needs to be a talloc context.
*
* @return NDR_ERR_SUCCESS if successful
* The contents of kmi are undefined on an error
}
/* modulus INTEGER */
- NDR_CHECK(read_integer(kmi, ndr, asn, "MODULUS", &kmi->modulus));
+ NDR_CHECK(read_integer(
+ ndr->current_mem_ctx, ndr, asn, "MODULUS", &kmi->modulus));
kmi->bit_size = (kmi->modulus.length * 8) - unused_bits;
/* public exponent INTEGER */
- NDR_CHECK(read_integer(kmi, ndr, asn, "EXPONENT", &kmi->exponent));
+ NDR_CHECK(read_integer(
+ ndr->current_mem_ctx, ndr, asn, "EXPONENT", &kmi->exponent));
if (!asn1_end_tag(asn)) { /* RSAPublicKey */
return ndr_pull_error(ndr,
* @param[in,out] ndr ndr pull context
* @param[in] ndr_flags
* @param[out] kmi the KeyMaterialInternal structure to populate
- * kmi needs to be a talloc context.
* @param[in] size number of bytes to process from the ndr context
*
* @return NDR_ERR_SUCCESS if successful
* @param[in,out] ndr ndr pull context
* @param[in] ndr_flags
* @param[out] kmi the KeyMaterialInternal structure to populate
- * kmi needs to be a talloc context.
*
* @return NDR_ERR_SUCCESS if successful
* The contents of kmi are undefined on an error
goto out_km;
}
kmi->bit_size = km->public_key.rsa_detail.keyBits;
- kmi->modulus = data_blob_talloc(kmi,
+ kmi->modulus = data_blob_talloc(ndr->current_mem_ctx,
km->public_key.rsa.buffer,
km->public_key.rsa.size);
if (kmi->modulus.data == NULL) {
goto out_km;
}
- kmi->exponent = data_blob_talloc(kmi,
+ kmi->exponent = data_blob_talloc(ndr->current_mem_ctx,
km->public_key.rsa_detail.exponent,
TPM_RSA_EXPONENT_SIZE);
if (kmi->exponent.data == NULL) {
* @param[in,out] ndr ndr pull context
* @param[in] ndr_flags
* @param[out] kmi the KeyMaterialInternal structure to populate
- * kmi needs to be a talloc context.
*
* @return NDR_ERR_SUCCESS if successful
* The contents of kmi are undefined on an error
kmi->bit_size = km->bit_length;
- kmi->modulus = data_blob_talloc(kmi,
+ kmi->modulus = data_blob_talloc(ndr->current_mem_ctx,
km->modulus,
km->modulus_len);
if (kmi->modulus.data == NULL) {
goto out_km;
}
- kmi->exponent = data_blob_talloc(kmi,
+ kmi->exponent = data_blob_talloc(ndr->current_mem_ctx,
km->public_exponent,
km->public_exponent_len);
if (kmi->exponent.data == NULL) {
* @param[in,out] ndr ndr pull context
* @param[in] ndr_flags
* @param[out] kmi the KeyMaterialInternal structure to populate
- * kmi needs to be a talloc context.
*
* @return NDR_ERR_SUCCESS if successful
* The contents of kmi are undefined on an error
* @param[in,out] ndr ndr push context
* @param[in] ndr_flags
* @param[out] kmi the KeyMaterialInternal structure to populate
- * kmi needs to be a talloc context.
*
* @note This is not currently implemented and will always return
* NDR_ERR_VALIDATE