diff options
Diffstat (limited to 'authfd.c')
-rw-r--r-- | authfd.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: authfd.c,v 1.51 2002/06/05 21:55:44 markus Exp $"); | 38 | RCSID("$OpenBSD: authfd.c,v 1.52 2002/06/15 00:01:36 markus Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -552,7 +552,7 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key) | |||
552 | } | 552 | } |
553 | 553 | ||
554 | int | 554 | int |
555 | ssh_lifetime_identity(AuthenticationConnection *auth, Key *key, u_int life) | 555 | ssh_contrain_identity(AuthenticationConnection *auth, Key *key, u_int life) |
556 | { | 556 | { |
557 | Buffer msg; | 557 | Buffer msg; |
558 | int type; | 558 | int type; |
@@ -562,21 +562,22 @@ ssh_lifetime_identity(AuthenticationConnection *auth, Key *key, u_int life) | |||
562 | buffer_init(&msg); | 562 | buffer_init(&msg); |
563 | 563 | ||
564 | if (key->type == KEY_RSA1) { | 564 | if (key->type == KEY_RSA1) { |
565 | buffer_put_char(&msg, SSH_AGENTC_LIFETIME_IDENTITY1); | 565 | buffer_put_char(&msg, SSH_AGENTC_CONTRAIN_IDENTITY1); |
566 | buffer_put_int(&msg, life); | ||
567 | buffer_put_int(&msg, BN_num_bits(key->rsa->n)); | 566 | buffer_put_int(&msg, BN_num_bits(key->rsa->n)); |
568 | buffer_put_bignum(&msg, key->rsa->e); | 567 | buffer_put_bignum(&msg, key->rsa->e); |
569 | buffer_put_bignum(&msg, key->rsa->n); | 568 | buffer_put_bignum(&msg, key->rsa->n); |
570 | } else if (key->type == KEY_DSA || key->type == KEY_RSA) { | 569 | } else if (key->type == KEY_DSA || key->type == KEY_RSA) { |
571 | key_to_blob(key, &blob, &blen); | 570 | key_to_blob(key, &blob, &blen); |
572 | buffer_put_char(&msg, SSH_AGENTC_LIFETIME_IDENTITY); | 571 | buffer_put_char(&msg, SSH_AGENTC_CONTRAIN_IDENTITY); |
573 | buffer_put_int(&msg, life); | ||
574 | buffer_put_string(&msg, blob, blen); | 572 | buffer_put_string(&msg, blob, blen); |
575 | xfree(blob); | 573 | xfree(blob); |
576 | } else { | 574 | } else { |
577 | buffer_free(&msg); | 575 | buffer_free(&msg); |
578 | return 0; | 576 | return 0; |
579 | } | 577 | } |
578 | buffer_put_char(&msg, SSH_AGENT_CONTRAIN_LIFETIME); | ||
579 | buffer_put_int(&msg, life); | ||
580 | |||
580 | if (ssh_request_reply(auth, &msg, &msg) == 0) { | 581 | if (ssh_request_reply(auth, &msg, &msg) == 0) { |
581 | buffer_free(&msg); | 582 | buffer_free(&msg); |
582 | return 0; | 583 | return 0; |