Add fips_module_id api#1623
Conversation
There was a problem hiding this comment.
According to #1573,
- we need to expose this API even without FIPS mode.
- we need to expose publicly, not in internal.
There was a problem hiding this comment.
It should return a uint32_t.
There was a problem hiding this comment.
@steven-bellock , I think we can use the semantic version, align with libspdm release. 4 bytes in total.
byte3 - libspdm major version
byte2 - libspdm minor version
byte1 - libspdm patch version
byte0 - FIPS mode enable/disable
Thought?
There was a problem hiding this comment.
Byte0 should be the release status.
0x00 - unreleased and pending
0x10 - pre-release
0x20 - released
There should be a separate mechanism to determine if FIPS is enabled or not.
There was a problem hiding this comment.
Good idea to include tag release. But I dont think we need distinguish unrelease v.s. pre-release. They should be same. One bit is enough. I suggest:
BIT[0] - official release tag or no tag.
BIT[1:5] - reserved.
BIT[6] - debug build or release debug
BIT[7] - FIPS mode or not
Why we need use different mechanism for reporting?
There was a problem hiding this comment.
The library's version is completely orthogonal to whether FIPS is enabled or not.
There was a problem hiding this comment.
I would say: the Byte0 is to provide additional binary info.
What we provide is
- official release tag or not
- release build or debug build
- FIPS mode or not
That helps people to understand what this binary is.
If you dont like FIPS info, then we should make it reserved to 0.
There was a problem hiding this comment.
I don't like the FIPS information in libspdm_module_version. So maybe we should have something more generic like
typedef enum {
LIBSPDM_INFO_VERSION,
LIBSPDM_INF_BUILD,
LIBSPDM_INFO_FIPS,
} libspdm_info_t;
uint32_t libspdm_get_module_info (libspdm_info_t info);
Then we can expand the enum as needed.
There was a problem hiding this comment.
Thanks. I am fixing for it.
There was a problem hiding this comment.
I think we can use below APIs:
/*
byte3 - libspdm major version
byte2 - libspdm minor version
byte1 - libspdm patch version
byte0 - libspdm alpha (office release with tag: 0, release candidate with tag: 1, non official release: 0xFF)
*/
uint32_t libspdm_module_version(void);
/* true: FIPS enabled, false: FIPS disabled*/
bool libspdm_get_fips_mode(void);
There was a problem hiding this comment.
It should return a uint32_t.
There was a problem hiding this comment.
Byte0 should be the release status.
0x00 - unreleased and pending
0x10 - pre-release
0x20 - released
There should be a separate mechanism to determine if FIPS is enabled or not.
There was a problem hiding this comment.
This needs to be available to the Integrator at compile time, so it will need to reside in include/library/spdm_common_lib.h.
8dcbca9 to
d3fbf1f
Compare
|
Please 1. resolve conflict. 2. use the final conclusion below: |
d3fbf1f to
99ef5e5
Compare
There was a problem hiding this comment.
please change to 0x03.0x00.0x00.0xff
There was a problem hiding this comment.
Thanks. I have changed it.
Reference: DMTF#1260 Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
99ef5e5 to
bc75868
Compare
Reference: #1260
Fix: #1573
Signed-off-by: Wenxing Hou wenxing.hou@intel.com