Conversation
Support HMAC with EVP_SKEY. Signed-off-by: Ilie Halip <ilie.halip@nxp.com>
Since openssl cli doesn't support generating an HMAC with an SKEY, add a test program that uses HMAC test vectors (RFC 4231, 4.2). Signed-off-by: Ilie Halip <ilie.halip@nxp.com>
|
Do you know why tls tests fail ? |
|
Yes, unfortunately the TLS1.2 implementation in the default provider uses HMAC and calls openssl 3.6 (I developed and tested against this version) and earlier actually end up using the default instead of the pkcs11 HMAC when doing TLS. This is because the propquery was not propagated to the KDF, so it would call |
Yes, this is used to keep a copy of the transaction hash, so the code actually depends on being able to duplicate the context, as you need to return intermediate values, but then continue adding data for the next hash. Kryoptic can deal with this (but currently I think I enabled context saving only for Hashes), but I am aware of only one other software token that can do this (NSS's softokn). To make this work reliably we may have to have an allow-list of tokens for which we make HMAC available to OpenSSL, and by default not claim HMAC. |
|
This PR will help future testing latchset/kryoptic#410 |
Description
Implement HMAC support with SKEYs.
Checklist
Reviewer's checklist: