aws / aws-lc

AWS-LC is a general-purpose cryptographic library maintained by the AWS Cryptography team for AWS and their customers. It іs based on code from the Google BoringSSL project and the OpenSSL project.
Other
398 stars 118 forks source link

Adding the OpenSSL s_client tool #1959

Open smittals2 opened 3 weeks ago

smittals2 commented 3 weeks ago

Issues:

CryptoAlg-2679

Description of changes:

Adding the s_client tool to our openssl CLI executable. It mostly uses the same code from our existing bssl CLI s_client tool. There are various changes to functions to help distinguish which CLI variant is being called. The output of bssl's CLI for s_client is also very different from OpenSSL 1.1.1. There are a lot of utility printing functions added and changes in logic to suppress output when using the openssl CLI.

Call-outs:

The verification output still doesn't match OpenSSL 1.1.1 fully. There is some missing data like peer CAs, peer tmp key, public key bits, and sig_algs.

Testing:

There are no OpenSSL comparison tests since our output does not match OpenSSL yet.

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.

codecov-commenter commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 6.04027% with 140 lines in your changes missing coverage. Please review.

Project coverage is 78.60%. Comparing base (ab8953b) to head (3be907c). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tool/client.cc 0.00% 120 Missing :warning:
tool-openssl/s_client.cc 0.00% 11 Missing :warning:
tool/transport_common.cc 50.00% 8 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1959 +/- ## ========================================== - Coverage 78.89% 78.60% -0.30% ========================================== Files 595 597 +2 Lines 102451 102820 +369 Branches 14527 14620 +93 ========================================== - Hits 80827 80819 -8 - Misses 20976 21350 +374 - Partials 648 651 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features:

justsmth commented 2 days ago

I know that there are no OpenSSL comparison tests yet, but shouldn't we at least have a few "sanity tests" to verify fundamental behaviors?

smittals2 commented 1 day ago

I know that there are no OpenSSL comparison tests yet, but shouldn't we at least have a few "sanity tests" to verify fundamental behaviors?

The core logic utilized is from the previously written bssl tooling. I can add in some tests to ensure the advertised options are parsed as expected