Skip to content
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

fix buffer_length check for EdDSA in util_pkcs11.c #390

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkcs11/util_pkcs11.c
Original file line number Diff line number Diff line change
Expand Up @@ -2223,7 +2223,6 @@ CK_RV apply_sign_mechanism_update(yubihsm_pkcs11_op_info *op_info,
break;

case CKM_ECDSA:
case CKM_EDDSA:
if (op_info->buffer_length + in_len > 128) {
// NOTE(adma): Specs say ECDSA only supports data up to 1024 bit
return CKR_DATA_LEN_RANGE;
Expand All @@ -2238,6 +2237,7 @@ CK_RV apply_sign_mechanism_update(yubihsm_pkcs11_op_info *op_info,
case CKM_SHA256_HMAC:
case CKM_SHA384_HMAC:
case CKM_SHA512_HMAC:
case CKM_EDDSA:
if (op_info->buffer_length + in_len > sizeof(op_info->buffer)) {
return CKR_DATA_LEN_RANGE;
}
Expand Down
Loading