projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New function ltime() returns a struct tm of the current local time.
[u/mdw/putty]
/
cmdgen.c
diff --git
a/cmdgen.c
b/cmdgen.c
index
42772aa
..
5042aa4
100644
(file)
--- a/
cmdgen.c
+++ b/
cmdgen.c
@@
-602,19
+602,17
@@
int main(int argc, char **argv)
if (keytype != NOKEYGEN) {
char *entropy;
char default_comment[80];
if (keytype != NOKEYGEN) {
char *entropy;
char default_comment[80];
- time_t t;
- struct tm *tm;
+ struct tm tm;
struct progress prog;
prog.phase = -1;
prog.current = -1;
struct progress prog;
prog.phase = -1;
prog.current = -1;
- time(&t);
- tm = localtime(&t);
+ tm = ltime();
if (keytype == DSA)
if (keytype == DSA)
- strftime(default_comment, 30, "dsa-key-%Y%m%d", tm);
+ strftime(default_comment, 30, "dsa-key-%Y%m%d",
&
tm);
else
else
- strftime(default_comment, 30, "rsa-key-%Y%m%d", tm);
+ strftime(default_comment, 30, "rsa-key-%Y%m%d",
&
tm);
random_ref();
entropy = get_random_data(bits / 8);
random_ref();
entropy = get_random_data(bits / 8);