Replies: 3 comments 7 replies
-
|
I tried to read https://github.com/jyao1/libspdm/blob/slot_management/doc/slot_management_database.md, but it's very verbose and hard to follow (then I realised it was partially written by an AI). My understanding from https://github.com/jyao1/libspdm/blob/slot_management/doc/slot_management_database.md#schema-c-structures is that this approach is basically a 3D array or certs/keys, not dissimilar to the direction #3629 is going in. It's a simple 3D array in C. Easy to manage and understand. Overall the idea is fine with me, although I'm not sure about the exact structure. I would prefer a single array maybe typedef struct {
libspdm_db_key_pair_t key_pair[LIBSPDM_DB_MAX_KEY_PAIRS];
libspdm_db_bank_t bank;
libspdm_db_slot_t slot[LIBSPDM_DB_MAX_SLOTS];
libspdm_db_slot_key_assoc_t slot_key_assoc[LIBSPDM_DB_MAX_SLOTS];
libspdm_db_cert_chain_t cert_chain[LIBSPDM_DB_MAX_SLOTS];
libspdm_db_csr_t csr[LIBSPDM_DB_MAX_SLOTS];
...
} libspdm_bank_t;and then libspdm_bank_t banks[LIBSPDM_DB_MAX_BANKS]Another idea I just had is to support an actual database. We wouldn't do this in libspdm, but instead have library helper functions that implementations have to use. That would for example require functions like |
Beta Was this translation helpful? Give feedback.
-
|
First, thanks to feedback.
If I could make it simple, I would. But unfortunately, it is NOT 3D array according to SPDM spec. Bank management and KeyPair management are 2 different API set.
Right. I do not want to expose the database in libspdm. At least in 4.0, I think we do not have time to do such a big change. |
Beta Was this translation helpful? Give feedback.
-
Great. Let's discuss that later.
The slot_management APIs, which I proposed at #3637. (See https://github.com/jyao1/libspdm/blob/slot_management/include/hal/library/responder/slot_mgmt.h) In general my thought is: The gist is that libspdm core library does not touch database directly, but treat it as an implementation choice. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[Background]
SPDM 1.4 added slot management feature (#3131).
[Problem Statement]
When we are trying to add slot management (#3637), we realize the there are problem of inconsistency in current cert and key_pair management. For example,
assoc_cert_slot_masknot consistent with slot certs orDIGESTSper-slotKeyPairID#3638https://github.com/jyao1/libspdm/blob/slot_management/doc/slot_management.md summarized the current status and add slot_management API on top of it. But the gap/limitation is still there.
[Proposal]
In order to fully resolve the inconsistency issue, we need a better way to management the bank/slot/key_pair/algo/cert, etc.
https://github.com/jyao1/libspdm/blob/slot_management/doc/slot_management_database.md is the proposal.
Beta Was this translation helpful? Give feedback.
All reactions