fix: check PEM write return values in key export functions#120
Merged
atoomic merged 2 commits intoMar 19, 2026
Merged
Conversation
atoomic
approved these changes
Mar 19, 2026
Collaborator
|
@toddr-bot Rebase |
PEM_write_bio_PrivateKey_traditional(), PEM_write_bio_RSAPublicKey(), and PEM_write_bio_PUBKEY() return values were unchecked. On failure, callers would silently return garbage/partial PEM data instead of croaking with an OpenSSL error. Also removes a trailing semicolon from the PEM_write_bio_PUBKEY macro on the OpenSSL 3.x path that prevented using the return value in expressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
92a61e0 to
cd17688
Compare
Contributor
Author
Rebase: fix: check PEM write return values in key export functionsBranch Diff: 1 file changed, 7 insertions(+), 5 deletions(-) Review feedback was analyzed and applied. Actions
CICI passed. Automated by Kōan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PEM_write_bio_PrivateKey_traditional(),PEM_write_bio_RSAPublicKey(), andPEM_write_bio_PUBKEY()in the three key export functionsPEM_write_bio_PUBKEYmacro on OpenSSL 3.x pathTest plan
make test— all 476 tests pass🤖 Generated with Claude Code
Quality Report
Changes: 1 file changed, 17 insertions(+), 5 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline