aws / aws/aws-encryption-sdk-c

Clean aws_cryptosdk_cmm_generate_enc_materials preconditions

Open
#539 1 comment 0 reactions 0 assignees View on GitHub
cbmc
Dominant language
C
Stars
63
Forks
59
PR merge metrics
No merged PRs in 30d

Description

`aws_cryptosdk_cmm_generate_enc_materials` has tests which pass invalid input, and check for the expected error code. These tests pass input which is invalid in several params, but only expects this to matter for the one they're checking. I had to allow `NULL` inputs for params that really shouldn't be to get those tests to pass. A better solution would be to either
1. Fix the tests
2. confirm that these are really the preconditions we want.

Contributor guide

Open the contributing guide

Research direction

Start by locating aws_cryptosdk_cmm_generate_enc_materials and its tests. Review each test's invalid parameter combinations and compare them with the function's intended preconditions and returned error codes. Done means the tests independently validate the parameter under test without relying on unrelated invalid inputs, and the preconditions are confirmed or corrected.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.