=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/monitor.c,v retrieving revision 1.184 retrieving revision 1.185 diff -u -r1.184 -r1.185 --- src/usr.bin/ssh/monitor.c 2018/07/10 09:13:30 1.184 +++ src/usr.bin/ssh/monitor.c 2018/07/11 18:53:29 1.185 @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor.c,v 1.184 2018/07/10 09:13:30 djm Exp $ */ +/* $OpenBSD: monitor.c,v 1.185 2018/07/11 18:53:29 markus Exp $ */ /* * Copyright 2002 Niels Provos * Copyright 2002 Markus Friedl @@ -51,7 +51,7 @@ #include "atomicio.h" #include "xmalloc.h" #include "ssh.h" -#include "key.h" +#include "sshkey.h" #include "sshbuf.h" #include "hostfile.h" #include "auth.h" @@ -551,14 +551,15 @@ char *alg = NULL; size_t datlen, siglen, alglen; int r, is_proof = 0; - u_int keyid; + u_int keyid, compat; const char proof_req[] = "hostkeys-prove-00@openssh.com"; debug3("%s", __func__); if ((r = sshbuf_get_u32(m, &keyid)) != 0 || (r = sshbuf_get_string(m, &p, &datlen)) != 0 || - (r = sshbuf_get_cstring(m, &alg, &alglen)) != 0) + (r = sshbuf_get_cstring(m, &alg, &alglen)) != 0 || + (r = sshbuf_get_u32(m, &compat)) != 0) fatal("%s: buffer error: %s", __func__, ssh_err(r)); if (keyid > INT_MAX) fatal("%s: invalid key ID", __func__); @@ -608,13 +609,13 @@ if ((key = get_hostkey_by_index(keyid)) != NULL) { if ((r = sshkey_sign(key, &signature, &siglen, p, datlen, alg, - datafellows)) != 0) + compat)) != 0) fatal("%s: sshkey_sign failed: %s", __func__, ssh_err(r)); } else if ((key = get_hostkey_public_by_index(keyid, ssh)) != NULL && auth_sock > 0) { if ((r = ssh_agent_sign(auth_sock, key, &signature, &siglen, - p, datlen, alg, datafellows)) != 0) { + p, datlen, alg, compat)) != 0) { fatal("%s: ssh_agent_sign failed: %s", __func__, ssh_err(r)); } @@ -895,7 +896,7 @@ if (key != NULL && authctxt->valid) { /* These should not make it past the privsep child */ - if (key_type_plain(key->type) == KEY_RSA && + if (sshkey_type_plain(key->type) == KEY_RSA && (datafellows & SSH_BUG_RSASIGMD5) != 0) fatal("%s: passed a SSH_BUG_RSASIGMD5 key", __func__);