Closed samuel40791765 closed 1 month ago
Attention: Patch coverage is 2.96296%
with 131 lines
in your changes missing coverage. Please review.
Project coverage is 78.31%. Comparing base (
0c52b12
) to head (93ad99f
).
Files | Patch % | Lines |
---|---|---|
tool-openssl/dgst.cc | 0.00% | 73 Missing :warning: |
tool-openssl/dgst_test.cc | 6.45% | 58 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Issues:
Addresses
CryptoAlg-2602
Description of changes:
Our original md5 stdin behavior was acting weird. The issue seems to be that we weren't actually parsing all of the input from
stdin
.The original implementation used
getline
which only reads one line. This worked with the original test since the file contents were sent intostdin
with<
, but this doesn't work correctly with otherstdin
behaviors such asecho test | openssl md5
. The correct and more useful way to handlestdin
is to read it from the0
file descriptor. This is how OpenSSL/BoringSSL reads from files.md5
onto ourdgst
implementation. This is identical to how OpenSSL factors the specific hashing tool names.md5
now usesdgst
under the hood and inherits the file hashing behavior we implemented fordgst hmac
.stdin
was missing fromdgst
, so that was implemented as well.stdin
now works for bothopenssl dgst -hmac ...
andopenssl md5
. Corresponding tests have also been added to verify.FIxed version:
Call-outs:
Deleted the md5 files since most logic was moved under
dgst
.Testing:
hmac stdin
md5 stdin
andmd5 files
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.