C_SignFinal rejects a NULL pSignature (length query)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start at the C_SignFinal implementation and compare its NULL-buffer handling with C_Sign; the issue identifies Session::sign as handling a NULL buffer already. Check the relevant signing tests, then verify that a NULL pSignature returns the required signature length and that signing a large streamed file with CKM_SHA256_RSA_PKCS succeeds.
Written by the indexing model from the issue text.
Description
C_SignFinal returns CKR_ARGUMENTS_BAD when pSignature is NULL. PKCS#11 (section 5.2) lets the caller pass NULL to get the length first; C_Sign here already supports it.
OpenSC 0.27's pkcs11-tool does this for data it streams through C_SignUpdate, so signing a large file with CKM_SHA256_RSA_PKCS fails.
Session::sign handles a NULL buffer, so removing not_null!(pSignature) from C_SignFinal looks like enough (I have not built that). Seen with 0.2.27; main is the same.
- Dominant language
- Rust
- Stars
- 75
- Forks
- 25
- Avg merge
- 14h 16m
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/native-pkcs11
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
google/native-pkcs11#470 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
google/native-pkcs11#445 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
google/native-pkcs11#417 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 52/100
google/native-pkcs11#392 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
google/native-pkcs11#303 ·
All issues in google/native-pkcs11
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Test connection's password prompt says the password is never saved, also for a keychain profileOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
area: settings bug Haiku review: no-score ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MMFoundation/WallpaperMachine#346 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rubys/roundhouse#2473 ·
-
bug mod: quantum info
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Qiskit/qiskit#17699 · 2 comments ·
Maintainers usually reply within 1 day