-
Notifications
You must be signed in to change notification settings - Fork 22
Global keystore #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Global keystore #224
Changes from all commits
0db21d6
ca977e8
79f9c4d
ec86201
be92918
3396e8a
5e86f03
56c4cfd
1483659
ef5c31e
bcdac71
8c346ce
74fe9aa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,8 +122,9 @@ static int _verifyChainAgainstCmStore(whServerContext* server, | |
|
|
||
| /* Grab the cache slot and dump the public key from the cert | ||
| * into it */ | ||
| rc = wh_Server_KeystoreGetCacheSlot(server, cacheBufSize, | ||
| &cacheBuf, &cacheMeta); | ||
| rc = wh_Server_KeystoreGetCacheSlot(server, *inout_keyId, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May want to make There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good note, I'm on the fence though.... mostly since we haven't made any API compatibility guarantees yet, and if we were to, it would likely be limited to the client API. I'd like to avoid a rats nest of |
||
| cacheBufSize, &cacheBuf, | ||
| &cacheMeta); | ||
| if (rc == WH_ERROR_OK) { | ||
| rc = wc_GetSubjectPubKeyInfoDerFromCert( | ||
| cert_ptr, cert_len + idx, cacheBuf, &cacheBufSize); | ||
|
|
@@ -488,7 +489,7 @@ int wh_Server_HandleCertRequest(whServerContext* server, uint16_t magic, | |
| cert_data = (const uint8_t*)req_packet + sizeof(req); | ||
|
|
||
| /* Map client keyId to server keyId space */ | ||
| whKeyId keyId = WH_MAKE_KEYID( | ||
| whKeyId keyId = WH_TRANSLATE_CLIENT_KEYID( | ||
| WH_KEYTYPE_CRYPTO, server->comm->client_id, req.keyId); | ||
|
|
||
| /* Process the verify action */ | ||
|
|
@@ -617,7 +618,7 @@ int wh_Server_HandleCertRequest(whServerContext* server, uint16_t magic, | |
| } | ||
| if (resp.rc == WH_ERROR_OK) { | ||
| /* Map client keyId to server keyId space */ | ||
| whKeyId keyId = WH_MAKE_KEYID( | ||
| whKeyId keyId = WH_TRANSLATE_CLIENT_KEYID( | ||
| WH_KEYTYPE_CRYPTO, server->comm->client_id, req.keyId); | ||
|
|
||
| /* Process the verify action */ | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.