-
Notifications
You must be signed in to change notification settings - Fork 9
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
load server-side key via CLI #16
Conversation
336bed0
to
3024e76
Compare
@billphipps ug, needs your fixes in #15 to get merged first, otherwise will keep failing CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good. Minor nits. Feel free to completely ignore.
|
||
static int wh_ServerTask(void* cf) | ||
static int loadAndStoreKeys(whServerContext* server, whKeyId* outKeyId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static int loadAndStoreKeys(whServerContext* server, whKeyId* outKeyId, | |
static int _LoadAndStoreKeys(whServerContext* server, whKeyId* outKeyId, |
Been trying to make all static functions start with _
int ret; | ||
int keyFd; | ||
int keySz; | ||
char keyLabel[] = "baby's first key"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe consider using basename(keyFilePath) for the label?
#define WOLFHSM_CFG_SERVER_DMAADDR_COUNT 8 | ||
#define WOLFHSM_CFG_SERVER_CUSTOMCB_COUNT 8 | ||
|
||
#define XMEMFENCE() __atomic_thread_fence(__ATOMIC_SEQ_CST) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you need this override for the example? I think the autodetect logic should pick the right one.
--key
and--id
CLI arguments. Required for wolfBoot simulator supportwhile(1)
and reinitializes the server context on client disconnect