upstream commit

switch from Key typedef with struct sshkey; ok djm@

Upstream-ID: 3067d33e04efbe5131ce8f70668c47a58e5b7a1f
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index 3e5706f..38940a6 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auth2-pubkey.c,v 1.62 2017/01/30 01:03:00 djm Exp $ */
+/* $OpenBSD: auth2-pubkey.c,v 1.63 2017/05/30 08:52:19 markus Exp $ */
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
  *
@@ -78,7 +78,7 @@
 userauth_pubkey(Authctxt *authctxt)
 {
 	Buffer b;
-	Key *key = NULL;
+	struct sshkey *key = NULL;
 	char *pkalg, *userstyle, *fp = NULL;
 	u_char *pkblob, *sig;
 	u_int alen, blen, slen;
@@ -220,7 +220,8 @@
 }
 
 void
-pubkey_auth_info(Authctxt *authctxt, const Key *key, const char *fmt, ...)
+pubkey_auth_info(Authctxt *authctxt, const struct sshkey *key,
+    const char *fmt, ...)
 {
 	char *fp, *extra;
 	va_list ap;
@@ -761,12 +762,12 @@
  * returns 1 if the key is allowed or 0 otherwise.
  */
 static int
-check_authkeys_file(FILE *f, char *file, Key* key, struct passwd *pw)
+check_authkeys_file(FILE *f, char *file, struct sshkey* key, struct passwd *pw)
 {
 	char line[SSH_MAX_PUBKEY_BYTES];
 	int found_key = 0;
 	u_long linenum = 0;
-	Key *found;
+	struct sshkey *found;
 
 	found_key = 0;
 
@@ -876,7 +877,7 @@
 
 /* Authenticate a certificate key against TrustedUserCAKeys */
 static int
-user_cert_trusted_ca(struct passwd *pw, Key *key)
+user_cert_trusted_ca(struct passwd *pw, struct sshkey *key)
 {
 	char *ca_fp, *principals_file = NULL;
 	const char *reason;
@@ -942,7 +943,7 @@
  * returns 1 if the key is allowed or 0 otherwise.
  */
 static int
-user_key_allowed2(struct passwd *pw, Key *key, char *file)
+user_key_allowed2(struct passwd *pw, struct sshkey *key, char *file)
 {
 	FILE *f;
 	int found_key = 0;
@@ -965,7 +966,7 @@
  * returns 1 if the key is allowed or 0 otherwise.
  */
 static int
-user_key_command_allowed2(struct passwd *user_pw, Key *key)
+user_key_command_allowed2(struct passwd *user_pw, struct sshkey *key)
 {
 	FILE *f = NULL;
 	int r, ok, found_key = 0;
@@ -1088,7 +1089,7 @@
  * Check whether key authenticates and authorises the user.
  */
 int
-user_key_allowed(struct passwd *pw, Key *key, int auth_attempt)
+user_key_allowed(struct passwd *pw, struct sshkey *key, int auth_attempt)
 {
 	u_int success, i;
 	char *file;