JackOfMostTrades / aws-kms-pkcs11

PKCS#11 Provider Using AWS KMS
MIT License
39 stars 17 forks source link

Add static_assert for pInfo field widths. #22

Closed rillian closed 1 year ago

rillian commented 1 year ago

Check at build time that the fixed-length fields in the struct we call memcpy against are actually the size we expect. This should help detect buffer overflow if the p11 library header changes under us.

JackOfMostTrades commented 1 year ago

I have a hard time imagining the ABI for pkcs11 modules would change since that would probably break all sorts of stuff, but it's a good sanity check to have at any rate. :)