Skip to content

Conversation

nhatnghiho
Copy link
Contributor

Issues:

Resolves #CryptoAlg-3383

Description of changes:

Re-implement dgst cli commands with the following options:
-binary
-sha256 (and a handful of other digest algorithms)
-sigopt
-passin
-sign
-out
-verify
-signature
-keyform

Call-outs:

Waiting for #2555 to implement -passin

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?

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.

@nhatnghiho nhatnghiho requested a review from a team as a code owner August 25, 2025 15:49
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 58.59729% with 183 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.89%. Comparing base (2c04af8) to head (5faf0b0).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
tool-openssl/dgst.cc 68.35% 75 Missing ⚠️
tool-openssl/dgst_test.cc 48.63% 75 Missing ⚠️
tool-openssl/test_util.h 6.66% 14 Missing ⚠️
tool/args.cc 12.50% 14 Missing ⚠️
tool-openssl/ordered_args.cc 77.27% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2638      +/-   ##
==========================================
+ Coverage   78.83%   78.89%   +0.06%     
==========================================
  Files         667      667              
  Lines      114077   114332     +255     
  Branches    16045    16085      +40     
==========================================
+ Hits        89932    90203     +271     
+ Misses      23370    23349      -21     
- Partials      775      780       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment on lines 383 to 386
for (size_t i = 0; i < data.size(); i++) {
BIO_printf(out_bio.get(), "%02x", data[i]);
}
BIO_printf(out_bio.get(), "\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just use BIO_hexdump here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No unfortunately. We need a raw hex dump but BIO_hexdump has a special formatting that looks something like this -- OFFSET HEX_BYTES |ASCII|

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