Repository navigation
ensure to clear openssl3 PEM reading errors - #1652
Closed
MartinNowak wants to merge 1 commit into
Closed
MartinNowak wants to merge 1 commit into
MartinNowak wants to merge 1 commit into
Conversation
MartinNowak
force-pushed
the
fix-openssl-errors-openssh-priv-key
branch
from
September 10, 2025 06:52
29ad38a to
c277595
Compare
MartinNowak
marked this pull request as draft
September 10, 2025 07:43
MartinNowak
force-pushed
the
fix-openssl-errors-openssh-priv-key
branch
from
September 10, 2025 08:46
c277595 to
7c0ce8d
Compare
MartinNowak
marked this pull request as ready for review
September 10, 2025 09:56
vszakats
reviewed
Sep 10, 2025
MartinNowak
force-pushed
the
fix-openssl-errors-openssh-priv-key
branch
3 times, most recently
from
September 11, 2025 08:48
1fadad1 to
1fb0906
Compare
vszakats
reviewed
Sep 13, 2025
vszakats
reviewed
Sep 13, 2025
MartinNowak
force-pushed
the
fix-openssl-errors-openssh-priv-key
branch
from
September 17, 2025 11:49
1fb0906 to
71e2dbc
Compare
- errors were left on openssl's error stack when reading OpenSSH private keys (e.g. in sign_frommemory → _libssh2_rsa_new_private_frommemory) - moved all private key reading to central read_private_key_from_bio method to consistently read and handle (passphrase) errors
MartinNowak
force-pushed
the
fix-openssl-errors-openssh-priv-key
branch
from
September 17, 2025 11:51
71e2dbc to
6c32b09
Compare
Author
|
Updated @vszakats |
Member
|
@MartinNowak Sorry this is taking so long, I'm finally getting to this, any chance you could push an updated MR with the conflicts resolved? Thanks. |
vszakats
requested changes
May 1, 2026
vszakats
left a comment
Member
There was a problem hiding this comment.
Formatting nits. Also needs rebasing on master.
Comment on lines
+1203
to
+1204
| *key_ctx = read_private_key(bp, NULL, (pem_password_cb *) passphrase_cb, | ||
| (void *) LIBSSH2_UNCONST(passphrase)); |
Member
There was a problem hiding this comment.
Suggested change
| *key_ctx = read_private_key(bp, NULL, (pem_password_cb *) passphrase_cb, | |
| (void *) LIBSSH2_UNCONST(passphrase)); | |
| *key_ctx = read_private_key(bp, NULL, (pem_password_cb *)passphrase_cb, | |
| (void *)LIBSSH2_UNCONST(passphrase)); |
| EVP_PKEY* pk; | ||
| int pktype; | ||
| int rc; | ||
| pem_read_bio_func read_pem = (pem_read_bio_func) &PEM_read_bio_PrivateKey; |
Member
There was a problem hiding this comment.
Suggested change
| pem_read_bio_func read_pem = (pem_read_bio_func) &PEM_read_bio_PrivateKey; | |
| pem_read_bio_func read_pem = (pem_read_bio_func)&PEM_read_bio_PrivateKey; |
| #ifdef HAVE_SSLERROR_BAD_DECRYPT | ||
| unsigned long sslError; | ||
| #endif | ||
| pem_read_bio_func read_pem = (pem_read_bio_func) &PEM_read_bio_PrivateKey; |
Member
There was a problem hiding this comment.
Suggested change
| pem_read_bio_func read_pem = (pem_read_bio_func) &PEM_read_bio_PrivateKey; | |
| pem_read_bio_func read_pem = (pem_read_bio_func)&PEM_read_bio_PrivateKey; |
Member
|
master diverged quite a bit since then, but this issue got Thanks for the patch, and let me know or feel free to open |
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.
(e.g. in sign_frommemory → _libssh2_rsa_new_private_frommemory)
to consistently read and handle (passphrase) errors