-
Notifications
You must be signed in to change notification settings - Fork 136
Adding pkeyutl tool to the CLI #2575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2575 +/- ##
==========================================
- Coverage 78.73% 78.64% -0.09%
==========================================
Files 645 647 +2
Lines 110626 111022 +396
Branches 15644 15706 +62
==========================================
+ Hits 87101 87315 +214
- Misses 22824 23010 +186
+ Partials 701 697 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…cess violations Remove redundant ReadFileToString operations in FileOutput test that were causing 0xc0000005 access violations in Windows/MSYS2 CI environments. ValidateKeyFile already confirms file existence, validity, and proper content, making the additional file reads unnecessary and problematic due to Windows file handle conflicts. Also renamed FileVsStdoutOutput to FileOutput to better reflect the actual test purpose. Fixes Windows CI failures similar to those seen in PR aws#2575. 🤖 Assisted by Amazon Q Developer
The msys2/ucrt64 CI failures seem related:
A "0xc0000005" exit status seems to be associated with memory access violations on Windows. |
Yea I've been trying to debug why we see this. Before opening the file, we stat it to make sure it exists. In this particular use case, the file is created by the test harness, opened via BIO APIs and populated by the pkeyutl tool, and then fails when we try to read the file subsequently to validate it's contents. I added additional explicit instructions to close any BIO handles that may create resource contention but continued seeing this error. We can see this in the logs here:
We also only see this access violation in msys2 ucrt64 - (Ninja/MinGW) builds. For example msys2 ucrt64 with MSYS Makefiles doesn't fail (neither do any of the other Windows CI checks). My two pending investigation avenues are as follows:
|
5486a85
to
47fde32
Compare
There was a problem hiding this 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
tool-openssl/pkeyutl_test.cc
Outdated
const int buffer_size = 1024; | ||
std::vector<char> buffer(buffer_size); | ||
std::string output; | ||
int bytes_read; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: variable 'bytes_read' is not initialized [cppcoreguidelines-init-variables]
int bytes_read; | |
int bytes_read = 0; |
I suspect the issue might be that it's linking to the wrong C++ runtime when the test runs. I have a couple of ideas we could try to debug these tests:
|
7a59b75
to
dd09936
Compare
Description of changes:
Add pkeutl tool with:
-help
-in
-out
-sign
-verify
-inkey
-sigfile
-pubin
-passin (awaiting #2555 to flesh this out)
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.