Bugzilla – Attachment 2338 Details for
Bug 2154
Avoid key lookup overhead when re-keying
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Move code slightly and add a debug() statement
cache-server-host-key.diff (text/plain), 965 bytes, created by
Iain Morgan
on 2013-09-19 09:24:35 AEST
(
hide
)
Description:
Move code slightly and add a debug() statement
Filename:
MIME Type:
Creator:
Iain Morgan
Created:
2013-09-19 09:24:35 AEST
Size:
965 bytes
patch
obsolete
>Index: sshconnect.c >=================================================================== >RCS file: /cvs/openssh/sshconnect.c,v >retrieving revision 1.212 >diff -u -r1.212 sshconnect.c >--- sshconnect.c 20 Aug 2013 16:44:25 -0000 1.212 >+++ sshconnect.c 18 Sep 2013 23:08:41 -0000 >@@ -65,6 +65,7 @@ > > char *client_version_string = NULL; > char *server_version_string = NULL; >+Key *previous_host_key = NULL; > > static int matching_host_key_dns = 0; > >@@ -1227,6 +1228,15 @@ > fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX); > debug("Server host key: %s %s", key_type(host_key), fp); > free(fp); >+ >+ if (key_equal(previous_host_key, host_key)) { >+ debug("Server host key matches cached key"); >+ return 1; >+ } >+ >+ /* The key is either accepted, or we discconnect. */ >+ if (previous_host_key == NULL) >+ previous_host_key = key_from_private(host_key); > > /* XXX certs are not yet supported for DNS */ > if (!key_is_cert(host_key) && options.verify_host_key_dns &&
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 2154
:
2337
|
2338
|
2341
|
2450