diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ssh-add.1 | 6 | ||||
-rw-r--r-- | ssh-add.c | 11 |
3 files changed, 17 insertions, 6 deletions
@@ -13,6 +13,10 @@ | |||
13 | - stevesk@cvs.openbsd.org 2002/06/10 16:56:30 | 13 | - stevesk@cvs.openbsd.org 2002/06/10 16:56:30 |
14 | [ssh-keysign.8] | 14 | [ssh-keysign.8] |
15 | merge in stuff from my man page; ok markus@ | 15 | merge in stuff from my man page; ok markus@ |
16 | - stevesk@cvs.openbsd.org 2002/06/10 17:36:23 | ||
17 | [ssh-add.1 ssh-add.c] | ||
18 | use convtime() to parse and validate key lifetime. can now | ||
19 | use '-t 2h' etc. ok markus@ provos@ | ||
16 | 20 | ||
17 | 20020609 | 21 | 20020609 |
18 | - (bal) OpenBSD CVS Sync | 22 | - (bal) OpenBSD CVS Sync |
@@ -878,4 +882,4 @@ | |||
878 | - (stevesk) entropy.c: typo in debug message | 882 | - (stevesk) entropy.c: typo in debug message |
879 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ | 883 | - (djm) ssh-keygen -i needs seeded RNG; report from markus@ |
880 | 884 | ||
881 | $Id: ChangeLog,v 1.2203 2002/06/11 15:50:13 mouring Exp $ | 885 | $Id: ChangeLog,v 1.2204 2002/06/11 15:51:54 mouring Exp $ |
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ssh-add.1,v 1.33 2002/06/05 21:55:44 markus Exp $ | 1 | .\" $OpenBSD: ssh-add.1,v 1.34 2002/06/10 17:36:22 stevesk Exp $ |
2 | .\" | 2 | .\" |
3 | .\" -*- nroff -*- | 3 | .\" -*- nroff -*- |
4 | .\" | 4 | .\" |
@@ -90,7 +90,9 @@ Lock the agent with a password. | |||
90 | Unlock the agent. | 90 | Unlock the agent. |
91 | .It Fl t Ar life | 91 | .It Fl t Ar life |
92 | Set a maximum lifetime when adding identities to an agent. | 92 | Set a maximum lifetime when adding identities to an agent. |
93 | The lifetime is specified in seconds. | 93 | The lifetime may be specified in seconds or in a time format |
94 | specified in | ||
95 | .Xr sshd 8 . | ||
94 | .It Fl s Ar reader | 96 | .It Fl s Ar reader |
95 | Add key in smartcard | 97 | Add key in smartcard |
96 | .Ar reader . | 98 | .Ar reader . |
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: ssh-add.c,v 1.56 2002/06/05 21:55:44 markus Exp $"); | 38 | RCSID("$OpenBSD: ssh-add.c,v 1.57 2002/06/10 17:36:23 stevesk Exp $"); |
39 | 39 | ||
40 | #include <openssl/evp.h> | 40 | #include <openssl/evp.h> |
41 | 41 | ||
@@ -48,6 +48,7 @@ RCSID("$OpenBSD: ssh-add.c,v 1.56 2002/06/05 21:55:44 markus Exp $"); | |||
48 | #include "authfile.h" | 48 | #include "authfile.h" |
49 | #include "pathnames.h" | 49 | #include "pathnames.h" |
50 | #include "readpass.h" | 50 | #include "readpass.h" |
51 | #include "misc.h" | ||
51 | 52 | ||
52 | #ifdef HAVE___PROGNAME | 53 | #ifdef HAVE___PROGNAME |
53 | extern char *__progname; | 54 | extern char *__progname; |
@@ -67,7 +68,7 @@ static char *default_files[] = { | |||
67 | }; | 68 | }; |
68 | 69 | ||
69 | /* Default lifetime (0 == forever) */ | 70 | /* Default lifetime (0 == forever) */ |
70 | static u_int lifetime = 0; | 71 | static int lifetime = 0; |
71 | 72 | ||
72 | /* we keep a cache of one passphrases */ | 73 | /* we keep a cache of one passphrases */ |
73 | static char *pass = NULL; | 74 | static char *pass = NULL; |
@@ -352,7 +353,11 @@ main(int argc, char **argv) | |||
352 | sc_reader_id = optarg; | 353 | sc_reader_id = optarg; |
353 | break; | 354 | break; |
354 | case 't': | 355 | case 't': |
355 | lifetime = atoi(optarg); | 356 | if ((lifetime = convtime(optarg)) == -1) { |
357 | fprintf(stderr, "Invalid lifetime\n"); | ||
358 | ret = 1; | ||
359 | goto done; | ||
360 | } | ||
356 | break; | 361 | break; |
357 | default: | 362 | default: |
358 | usage(); | 363 | usage(); |