Skip to content

Minor cleanup of raft encryption algorithms #2635

Merged
anshulpundir merged 1 commit intomoby:masterfrom
cyli:encryption-cleanup
May 21, 2018
Merged

Minor cleanup of raft encryption algorithms #2635
anshulpundir merged 1 commit intomoby:masterfrom
cyli:encryption-cleanup

Conversation

@cyli
Copy link
Contributor

@cyli cyli commented May 17, 2018

As @justincormack pointed out in #2632, MultiDecrypter's Decrypt function is somewhat hard to read, and there are no tests for the fallthrough case. This PR adds those fallthrough tests and also uses explicit returns rather than named return variables in the Decrypt function.

Also changes the error message when we can't decrypt the record to be slightly more friendly.

function easier to read. Also change the error messages returned by
fernet and nacl decryption to be more friendly.

Signed-off-by: Ying Li <ying.li@docker.com>
@cyli cyli force-pushed the encryption-cleanup branch from d8d31c5 to 649f784 Compare May 17, 2018 18:23
@codecov
Copy link

codecov bot commented May 17, 2018

Codecov Report

Merging #2635 into master will decrease coverage by 0.2%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2635      +/-   ##
==========================================
- Coverage   62.59%   62.38%   -0.21%     
==========================================
  Files          51      134      +83     
  Lines        7180    21823   +14643     
==========================================
+ Hits         4494    13615    +9121     
- Misses       2231     6749    +4518     
- Partials      455     1459    +1004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants