-
Notifications
You must be signed in to change notification settings - Fork 16
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
PKCS11 TPM support #23
Conversation
643dd33
to
8a2eae2
Compare
1fd117e
to
9de6d53
Compare
…and supports RSA and ECC. Requires wolfSSL/wolfTPM#311 Added CI testing for wolfPKCS11 with wolfTPM backend and single threaded.
f61e105
to
52711af
Compare
…O_ENV` when setenv/getenv is not available. Only require `-ldl` for non-static builds.
@SparkiDev this is ready for your review and finalization. I'll followup with any portability issues in a new PR. |
src/internal.c
Outdated
case WOLFPKCS11_STORE_DHKEY_PRIV: | ||
case WOLFPKCS11_STORE_DHKEY_PUB: | ||
default: | ||
maxSz = -1; |
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.
BAD_FUNC_ARG?
src/internal.c
Outdated
/** | ||
* Free dynamic memory associated with the slot. | ||
* | ||
* @param slot [in] Slot object. | ||
*/ | ||
static void wp11_Slot_Final(WP11_Slot* slot) | ||
{ | ||
if (slot == NULL) return; |
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.
return on next line
src/internal.c
Outdated
@@ -3001,6 +3271,11 @@ static int wp11_Slot_Init(WP11_Slot* slot, int id) | |||
|
|||
ret = WP11_Lock_Init(&slot->lock); | |||
if (ret == 0) { | |||
#ifdef WOLFPKCS11_TPM | |||
if (ret == 0) { |
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.
'ret == 0' checks look wrong
Requires Add TPM crypto callback support for RSA key generation wolfTPM#311
WOLFPKCS11_TPM_STORE
).