diff options
author | Damien Miller <djm@mindrot.org> | 2003-01-24 01:36:23 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-01-24 01:36:23 +0100 |
commit | 6c71179f6839ab49e4e8a91209eef85dc190d5f1 (patch) | |
tree | 199fd690f2933dc18a687d5b86be467a2250f2d1 /authfd.c | |
parent | - (djm) OpenBSD CVS Sync (diff) | |
download | openssh-6c71179f6839ab49e4e8a91209eef85dc190d5f1.tar.xz openssh-6c71179f6839ab49e4e8a91209eef85dc190d5f1.zip |
- markus@cvs.openbsd.org 2003/01/23 13:50:27
[authfd.c authfd.h readpass.c ssh-add.1 ssh-add.c ssh-agent.c]
ssh-add -c, prompt user for confirmation (using ssh-askpass) when
private agent key is used; with djm@; test by dugsong@, djm@;
ok deraadt@
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -35,7 +35,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: authfd.c,v 1.57 2002/09/11 18:27:26 stevesk Exp $"); +RCSID("$OpenBSD: authfd.c,v 1.58 2003/01/23 13:50:27 markus Exp $"); #include <openssl/evp.h> @@ -499,10 +499,10 @@ ssh_encode_identity_ssh2(Buffer *b, Key *key, const char *comment) int ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key, - const char *comment, u_int life) + const char *comment, u_int life, u_int confirm) { Buffer msg; - int type, constrained = (life != 0); + int type, constrained = (life || confirm); buffer_init(&msg); @@ -532,6 +532,8 @@ ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key, buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_LIFETIME); buffer_put_int(&msg, life); } + if (confirm != 0) + buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_CONFIRM); } if (ssh_request_reply(auth, &msg, &msg) == 0) { buffer_free(&msg); @@ -545,7 +547,7 @@ ssh_add_identity_constrained(AuthenticationConnection *auth, Key *key, int ssh_add_identity(AuthenticationConnection *auth, Key *key, const char *comment) { - return ssh_add_identity_constrained(auth, key, comment, 0); + return ssh_add_identity_constrained(auth, key, comment, 0, 0); } /* |