Bugzilla – Attachment 2844 Details for
Bug 2522
Key parser should reflect errors from OpenSSL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Do not fallback to PEM parser, if only passphrase is wrong
file_2522.txt (text/plain), 975 bytes, created by
Jakub Jelen
on 2016-06-29 20:41:33 AEST
(
hide
)
Description:
Do not fallback to PEM parser, if only passphrase is wrong
Filename:
MIME Type:
Creator:
Jakub Jelen
Created:
2016-06-29 20:41:33 AEST
Size:
975 bytes
patch
obsolete
>diff --git a/sshkey.c b/sshkey.c >index c9f04cd..a7a4f59 100644 >--- a/sshkey.c >+++ b/sshkey.c >@@ -3860,6 +3860,7 @@ int > sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type, > const char *passphrase, struct sshkey **keyp, char **commentp) > { >+ int r = SSH_ERR_INTERNAL_ERROR; > if (keyp != NULL) > *keyp = NULL; > if (commentp != NULL) >@@ -3882,9 +3883,11 @@ sshkey_parse_private_fileblob_type(struct sshbuf *blob, int type, > return sshkey_parse_private2(blob, type, passphrase, > keyp, commentp); > case KEY_UNSPEC: >- if (sshkey_parse_private2(blob, type, passphrase, keyp, >- commentp) == 0) >- return 0; >+ r = sshkey_parse_private2(blob, type, passphrase, keyp, >+ commentp); >+ /* Do not fallback to PEM parser, if only passphrase is wrong */ >+ if (r == 0 || r == SSH_ERR_KEY_WRONG_PASSPHRASE) >+ return r; > #ifdef WITH_OPENSSL > return sshkey_parse_private_pem_fileblob(blob, type, > passphrase, keyp);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2522
:
2781
|
2806
| 2844