diff options
Diffstat (limited to 'ssh-add.c')
-rw-r--r-- | ssh-add.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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(); |