Provide function that returns pointer to export master secret
Currently if an integrator wants to extract the Export Master Secret from the SPDM context they'll use the libspdm_secured_message_export_master_secret which does the memcpy for them. However the integrator may want to do the memcpy themselves, and pass the pointer to other functions, in which case libspdm should provide a libspdm_secured_message_get_export_master_secret function that returns a pointer to the EMS.
A pointer will expose the internal data structure, this is not the good idea.
May I know why the integrator want to do memcpy by themselves?
May I know why the integrator want to do memcpy by themselves?
Perhaps they don't want to expose the destination pointer to libspdm? Either way there's two models of exporting / importing the EMS secret and I think it's fine to support both.
Steven to talk with NVIDIA folks.
We'll work around this. Closing.