diff options
author | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-05 06:41:44 +0100 |
commit | 102062f825fb26a74295a1c089c00c4c4c76b68a (patch) | |
tree | 3db66bc8c8483cce66516dff36f6ef56065143d9 /auth2-pubkey.c | |
parent | 3d246f10429fc9a37b98eabef94fe8dc7c61002b (diff) | |
parent | fd0fa130ecf06d7d092932adcd5d77f1549bfc8d (diff) |
Import openssh_8.0p1.orig.tar.gz
Diffstat (limited to 'auth2-pubkey.c')
-rw-r--r-- | auth2-pubkey.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/auth2-pubkey.c b/auth2-pubkey.c index 2fb5950ea..0b3975a74 100644 --- a/auth2-pubkey.c +++ b/auth2-pubkey.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: auth2-pubkey.c,v 1.86 2018/09/20 03:28:06 djm Exp $ */ | 1 | /* $OpenBSD: auth2-pubkey.c,v 1.87 2019/01/22 11:26:16 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -102,6 +102,22 @@ userauth_pubkey(struct ssh *ssh) | |||
102 | (r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 || | 102 | (r = sshpkt_get_cstring(ssh, &pkalg, NULL)) != 0 || |
103 | (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0) | 103 | (r = sshpkt_get_string(ssh, &pkblob, &blen)) != 0) |
104 | fatal("%s: parse request failed: %s", __func__, ssh_err(r)); | 104 | fatal("%s: parse request failed: %s", __func__, ssh_err(r)); |
105 | |||
106 | if (log_level_get() >= SYSLOG_LEVEL_DEBUG2) { | ||
107 | char *keystring; | ||
108 | struct sshbuf *pkbuf; | ||
109 | |||
110 | if ((pkbuf = sshbuf_from(pkblob, blen)) == NULL) | ||
111 | fatal("%s: sshbuf_from failed", __func__); | ||
112 | if ((keystring = sshbuf_dtob64(pkbuf)) == NULL) | ||
113 | fatal("%s: sshbuf_dtob64 failed", __func__); | ||
114 | debug2("%s: %s user %s %s public key %s %s", __func__, | ||
115 | authctxt->valid ? "valid" : "invalid", authctxt->user, | ||
116 | have_sig ? "attempting" : "querying", pkalg, keystring); | ||
117 | sshbuf_free(pkbuf); | ||
118 | free(keystring); | ||
119 | } | ||
120 | |||
105 | pktype = sshkey_type_from_name(pkalg); | 121 | pktype = sshkey_type_from_name(pkalg); |
106 | if (pktype == KEY_UNSPEC) { | 122 | if (pktype == KEY_UNSPEC) { |
107 | /* this is perfectly legal */ | 123 | /* this is perfectly legal */ |