summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshconnect2.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2001-06-26 20:14:10 +0000
committermarkus <markus@openbsd.org>2001-06-26 20:14:10 +0000
commit477b4babd1b41419bfd349aa200918e3d2563a79 (patch)
treef5f6d63cdaeccdcccc260ffdc430dc600531ef6d /usr.bin/ssh/sshconnect2.c
parentregen (diff)
downloadwireguard-openbsd-477b4babd1b41419bfd349aa200918e3d2563a79.tar.xz
wireguard-openbsd-477b4babd1b41419bfd349aa200918e3d2563a79.zip
add smartcard support to the client, too (now you can use both
the agent and the client).
Diffstat (limited to 'usr.bin/ssh/sshconnect2.c')
-rw-r--r--usr.bin/ssh/sshconnect2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 258ee483463..2e2452801c6 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.79 2001/06/25 20:26:37 stevesk Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.80 2001/06/26 20:14:11 markus Exp $");
#include <openssl/bn.h>
#include <openssl/md5.h>
@@ -640,6 +640,11 @@ identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
idx = authctxt->last_key_hint;
if (idx < 0)
return -1;
+
+ /* private key is stored in external hardware */
+ if (options.identity_keys[idx]->flags & KEY_FLAG_EXT)
+ return key_sign(options.identity_keys[idx], sigp, lenp, data, datalen);
+
private = load_identity_file(options.identity_files[idx]);
if (private == NULL)
return -1;