[authfd.c authfd.h ssh-add.c ssh-agent.c]
     fix stupid typo
This commit is contained in:
Ben Lindstrom 2002-06-21 00:06:54 +00:00
parent 4eb4c4e1ef
commit c90f8a98ea
5 changed files with 23 additions and 20 deletions

View File

@ -9,6 +9,9 @@
[authfd.c authfd.h ssh-add.c ssh-agent.c] [authfd.c authfd.h ssh-add.c ssh-agent.c]
break agent key lifetime protocol and allow other contraints for key break agent key lifetime protocol and allow other contraints for key
usage. usage.
- markus@cvs.openbsd.org 2002/06/15 00:07:38
[authfd.c authfd.h ssh-add.c ssh-agent.c]
fix stupid typo
20020613 20020613
- (bal) typo of setgroup for cygwin. Patch by vinschen@redhat.com - (bal) typo of setgroup for cygwin. Patch by vinschen@redhat.com
@ -937,4 +940,4 @@
- (stevesk) entropy.c: typo in debug message - (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@ - (djm) ssh-keygen -i needs seeded RNG; report from markus@
$Id: ChangeLog,v 1.2219 2002/06/21 00:04:48 mouring Exp $ $Id: ChangeLog,v 1.2220 2002/06/21 00:06:54 mouring Exp $

View File

@ -35,7 +35,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: authfd.c,v 1.52 2002/06/15 00:01:36 markus Exp $"); RCSID("$OpenBSD: authfd.c,v 1.53 2002/06/15 00:07:38 markus Exp $");
#include <openssl/evp.h> #include <openssl/evp.h>
@ -552,7 +552,7 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key)
} }
int int
ssh_contrain_identity(AuthenticationConnection *auth, Key *key, u_int life) ssh_constrain_identity(AuthenticationConnection *auth, Key *key, u_int life)
{ {
Buffer msg; Buffer msg;
int type; int type;
@ -562,20 +562,20 @@ ssh_contrain_identity(AuthenticationConnection *auth, Key *key, u_int life)
buffer_init(&msg); buffer_init(&msg);
if (key->type == KEY_RSA1) { if (key->type == KEY_RSA1) {
buffer_put_char(&msg, SSH_AGENTC_CONTRAIN_IDENTITY1); buffer_put_char(&msg, SSH_AGENTC_CONSTRAIN_IDENTITY1);
buffer_put_int(&msg, BN_num_bits(key->rsa->n)); buffer_put_int(&msg, BN_num_bits(key->rsa->n));
buffer_put_bignum(&msg, key->rsa->e); buffer_put_bignum(&msg, key->rsa->e);
buffer_put_bignum(&msg, key->rsa->n); buffer_put_bignum(&msg, key->rsa->n);
} else if (key->type == KEY_DSA || key->type == KEY_RSA) { } else if (key->type == KEY_DSA || key->type == KEY_RSA) {
key_to_blob(key, &blob, &blen); key_to_blob(key, &blob, &blen);
buffer_put_char(&msg, SSH_AGENTC_CONTRAIN_IDENTITY); buffer_put_char(&msg, SSH_AGENTC_CONSTRAIN_IDENTITY);
buffer_put_string(&msg, blob, blen); buffer_put_string(&msg, blob, blen);
xfree(blob); xfree(blob);
} else { } else {
buffer_free(&msg); buffer_free(&msg);
return 0; return 0;
} }
buffer_put_char(&msg, SSH_AGENT_CONTRAIN_LIFETIME); buffer_put_char(&msg, SSH_AGENT_CONSTRAIN_LIFETIME);
buffer_put_int(&msg, life); buffer_put_int(&msg, life);
if (ssh_request_reply(auth, &msg, &msg) == 0) { if (ssh_request_reply(auth, &msg, &msg) == 0) {

View File

@ -1,4 +1,4 @@
/* $OpenBSD: authfd.h,v 1.27 2002/06/15 00:01:36 markus Exp $ */ /* $OpenBSD: authfd.h,v 1.28 2002/06/15 00:07:38 markus Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
@ -47,10 +47,10 @@
#define SSH_AGENTC_UNLOCK 23 #define SSH_AGENTC_UNLOCK 23
/* constrain key usage */ /* constrain key usage */
#define SSH_AGENTC_CONTRAIN_IDENTITY1 24 #define SSH_AGENTC_CONSTRAIN_IDENTITY1 24
#define SSH_AGENTC_CONTRAIN_IDENTITY 25 #define SSH_AGENTC_CONSTRAIN_IDENTITY 25
#define SSH_AGENT_CONTRAIN_LIFETIME 1 #define SSH_AGENT_CONSTRAIN_LIFETIME 1
/* extended failure messages */ /* extended failure messages */
#define SSH2_AGENT_FAILURE 30 #define SSH2_AGENT_FAILURE 30
@ -75,7 +75,7 @@ int ssh_get_num_identities(AuthenticationConnection *, int);
Key *ssh_get_first_identity(AuthenticationConnection *, char **, int); Key *ssh_get_first_identity(AuthenticationConnection *, char **, int);
Key *ssh_get_next_identity(AuthenticationConnection *, char **, int); Key *ssh_get_next_identity(AuthenticationConnection *, char **, int);
int ssh_add_identity(AuthenticationConnection *, Key *, const char *); int ssh_add_identity(AuthenticationConnection *, Key *, const char *);
int ssh_contrain_identity(AuthenticationConnection *, Key *, u_int); int ssh_constrain_identity(AuthenticationConnection *, Key *, u_int);
int ssh_remove_identity(AuthenticationConnection *, Key *); int ssh_remove_identity(AuthenticationConnection *, Key *);
int ssh_remove_all_identities(AuthenticationConnection *, int); int ssh_remove_all_identities(AuthenticationConnection *, int);
int ssh_lock_agent(AuthenticationConnection *, int, const char *); int ssh_lock_agent(AuthenticationConnection *, int, const char *);

View File

@ -35,7 +35,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$OpenBSD: ssh-add.c,v 1.58 2002/06/15 00:01:36 markus Exp $"); RCSID("$OpenBSD: ssh-add.c,v 1.59 2002/06/15 00:07:38 markus Exp $");
#include <openssl/evp.h> #include <openssl/evp.h>
@ -171,7 +171,7 @@ add_file(AuthenticationConnection *ac, const char *filename)
fprintf(stderr, "Could not add identity: %s\n", filename); fprintf(stderr, "Could not add identity: %s\n", filename);
if (ret == 0 && lifetime != 0) { if (ret == 0 && lifetime != 0) {
if (ssh_contrain_identity(ac, private, lifetime)) { if (ssh_constrain_identity(ac, private, lifetime)) {
fprintf(stderr, fprintf(stderr,
"Lifetime set to %d seconds for: %s (%s)\n", "Lifetime set to %d seconds for: %s (%s)\n",
lifetime, filename, comment); lifetime, filename, comment);

View File

@ -35,7 +35,7 @@
#include "includes.h" #include "includes.h"
#include "openbsd-compat/fake-queue.h" #include "openbsd-compat/fake-queue.h"
RCSID("$OpenBSD: ssh-agent.c,v 1.92 2002/06/15 00:01:36 markus Exp $"); RCSID("$OpenBSD: ssh-agent.c,v 1.93 2002/06/15 00:07:38 markus Exp $");
#include <openssl/evp.h> #include <openssl/evp.h>
#include <openssl/md5.h> #include <openssl/md5.h>
@ -470,7 +470,7 @@ send:
} }
static void static void
process_contrain_identity(SocketEntry *e, int version) process_constrain_identity(SocketEntry *e, int version)
{ {
Key *key = NULL; Key *key = NULL;
u_char *blob; u_char *blob;
@ -493,7 +493,7 @@ process_contrain_identity(SocketEntry *e, int version)
} }
while (buffer_len(&e->request)) { while (buffer_len(&e->request)) {
switch (buffer_get_char(&e->request)) { switch (buffer_get_char(&e->request)) {
case SSH_AGENT_CONTRAIN_LIFETIME: case SSH_AGENT_CONSTRAIN_LIFETIME:
death = time(NULL) + buffer_get_int(&e->request); death = time(NULL) + buffer_get_int(&e->request);
break; break;
default: default:
@ -714,8 +714,8 @@ process_message(SocketEntry *e)
case SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES: case SSH_AGENTC_REMOVE_ALL_RSA_IDENTITIES:
process_remove_all_identities(e, 1); process_remove_all_identities(e, 1);
break; break;
case SSH_AGENTC_CONTRAIN_IDENTITY1: case SSH_AGENTC_CONSTRAIN_IDENTITY1:
process_contrain_identity(e, 1); process_constrain_identity(e, 1);
break; break;
/* ssh2 */ /* ssh2 */
case SSH2_AGENTC_SIGN_REQUEST: case SSH2_AGENTC_SIGN_REQUEST:
@ -733,8 +733,8 @@ process_message(SocketEntry *e)
case SSH2_AGENTC_REMOVE_ALL_IDENTITIES: case SSH2_AGENTC_REMOVE_ALL_IDENTITIES:
process_remove_all_identities(e, 2); process_remove_all_identities(e, 2);
break; break;
case SSH_AGENTC_CONTRAIN_IDENTITY: case SSH_AGENTC_CONSTRAIN_IDENTITY:
process_contrain_identity(e, 2); process_constrain_identity(e, 2);
break; break;
#ifdef SMARTCARD #ifdef SMARTCARD
case SSH_AGENTC_ADD_SMARTCARD_KEY: case SSH_AGENTC_ADD_SMARTCARD_KEY: