Bugzilla – Attachment 3010 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]
report mismatched private keys
bz2737.diff (text/plain), 625 bytes, created by
Damien Miller
on 2017-07-07 13:44:57 AEST
(
hide
)
Description:
report mismatched private keys
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-07-07 13:44:57 AEST
Size:
625 bytes
patch
obsolete
>diff --git a/sshconnect2.c b/sshconnect2.c >index 3a70ebb..da94e67 100644 >--- a/sshconnect2.c >+++ b/sshconnect2.c >@@ -1029,6 +1029,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_INVALID_ARGUMENT; >+ } > 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
Actions:
View
|
Diff
Attachments on
bug 2737
:
3010
|
3021