Skip to content

Commit

Permalink
Remove unnecessary length check
Browse files Browse the repository at this point in the history
  • Loading branch information
aveenismail committed Aug 27, 2024
1 parent f20ebe3 commit 4087d31
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions ykcs11/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -2616,17 +2616,6 @@ CK_RV check_create_rsa_key(CK_ATTRIBUTE_PTR templ, CK_ULONG n, CK_BYTE_PTR id,
return CKR_TEMPLATE_INCOMPLETE;
}

if (*p_len != 64 && *p_len != 128 && *p_len != 192 && *p_len != 256) {
DBG("Invalid RSA component lengths");
return CKR_ATTRIBUTE_VALUE_INVALID;
}

if (*q_len != *p_len || *dp_len > *p_len ||
*dq_len > *p_len || *qinv_len > *p_len) {
DBG("Invalid RSA component lengths");
return CKR_ATTRIBUTE_VALUE_INVALID;
}

return CKR_OK;
}

Expand Down

0 comments on commit 4087d31

Please sign in to comment.