Skip to content

usercertinmem: use the correct cert BIO#20800

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/usercertinmem
Closed

usercertinmem: use the correct cert BIO#20800
bagder wants to merge 1 commit intomasterfrom
bagder/usercertinmem

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 3, 2026

PEM_read_bio_PrivateKey() is called with the wrong BIO, so the private key is not loaded.

Follow-up to 8494012

Pointed out by Codex Security

PEM_read_bio_PrivateKey() is called with the wrong BIO, so the private
key is not loaded.

Follow-up to 8494012

Pointed out by Codex Security
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the in-memory user certificate example so OpenSSL reads the private key from the correct BIO, ensuring the key actually loads.

Changes:

  • Pass kbio (private-key BIO) to PEM_read_bio_PrivateKey() instead of bio (certificate BIO).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 7079f1d Mar 3, 2026
@bagder bagder deleted the bagder/usercertinmem branch March 3, 2026 22:16
bagder added a commit that referenced this pull request Mar 3, 2026
PEM_read_bio_PrivateKey() is called with the wrong BIO, so the private
key is not loaded.

Follow-up to 8494012

Pointed out by Codex Security
Closes #20800
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants