Bugzilla – Attachment 3021 Details for
Bug 2737
function identity_sign() assume private key's pub part as same as the .pub key.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
with better error code
bz2737.diff (text/plain), 853 bytes, created by
Damien Miller
on 2017-07-28 13:42:59 AEST
(
hide
)
Description:
with better error code
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-07-28 13:42:59 AEST
Size:
853 bytes
patch
obsolete
>commit c49b41610373107a016143c090ef20fee430b962 >Author: Damien Miller <djm@mindrot.org> >Date: Fri Jul 28 13:41:15 2017 +1000 > > Report when private key does not match public key > > bz#2737; report by jj.net AT 163.com > >diff --git a/sshconnect2.c b/sshconnect2.c >index d2de5bc9..05d43810 100644 >--- a/sshconnect2.c >+++ b/sshconnect2.c >@@ -1037,6 +1037,11 @@ identity_sign(struct identity *id, u_char **sigp, size_t *lenp, > /* load the private key from the file */ > if ((prv = load_identity_file(id)) == NULL) > return SSH_ERR_KEY_NOT_FOUND; >+ if (id->key != NULL && !sshkey_equal_public(prv, id->key)) { >+ error("%s: private key %s contents do not match public", >+ __func__, id->filename); >+ return SSH_ERR_KEY_NOT_FOUND; >+ } > ret = sshkey_sign(prv, sigp, lenp, data, datalen, > key_sign_encode(prv), compat); > sshkey_free(prv);
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 2737
:
3010
| 3021