ARMmbed / ARMmbed/mbed-crypto

Test error cases of PK parse

Open
#79 2 comments 0 reactions 0 assignees View on GitHub
enhancement Jira status: REOPENED mirrored type: enhancement
Dominant language
C
Stars
108
Forks
95
PR merge metrics
No merged PRs in 30d

Description

### Description

A code coverage review shows some test gaps in `mbedtls_pk_parse_subpubkey`: many error cases are never hit by the Mbed TLS, and many more are only hit by X.509 and TLS tests but not by crypto unit tests. So in Mbed Crypto, many error cases are not tested. Likewise, `mbedtls_pem_read_buffer` lacks a unit test for `BASE64_INVALID_CHARACTER`.

### Issue request type

[ ] Question
[x] Enhancement
[ ] Bug

Contributor guide

Open the contributing guide

Research direction

Locate mbedtls_pk_parse_subpubkey and mbedtls_pem_read_buffer, then inspect the existing Mbed Crypto unit tests and coverage gaps described in the issue. Compare error paths already exercised only by X.509 and TLS tests with those missing from crypto tests. Done means the identified PK parse errors and BASE64_INVALID_CHARACTER have direct unit-test coverage; the repository states that development moved to Mbed TLS.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cryptography, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.