sync code with last fixes and improvements from OpenBSD

This commit is contained in:
purplerain 2023-08-08 00:42:18 +00:00
parent 691f97cc10
commit 371ae113c6
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
175 changed files with 2932 additions and 1512 deletions

View file

@ -1,4 +1,4 @@
/* $OpenBSD: sshconnect2.c,v 1.366 2023/03/09 07:11:05 dtucker Exp $ */
/* $OpenBSD: sshconnect2.c,v 1.367 2023/08/01 08:15:04 dtucker Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@ -1861,12 +1861,10 @@ userauth_pubkey(struct ssh *ssh)
* private key instead
*/
if (id->key != NULL) {
if (id->key != NULL) {
ident = format_identity(id);
debug("Offering public key: %s", ident);
free(ident);
sent = send_pubkey_test(ssh, id);
}
ident = format_identity(id);
debug("Offering public key: %s", ident);
free(ident);
sent = send_pubkey_test(ssh, id);
} else {
debug("Trying private key: %s", id->filename);
id->key = load_identity_file(id);