projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When checking to see whether we have to rebind a new key and/or
[citadel.git]
/
webcit
/
crypto.c
diff --git
a/webcit/crypto.c
b/webcit/crypto.c
index d0804beaf1ec9a661d658bc203f70289fb568671..bd08639026d7e721bcd284ac8ec7fa1955820f2f 100644
(file)
--- a/
webcit/crypto.c
+++ b/
webcit/crypto.c
@@
-84,9
+84,9
@@
void init_ssl(void) {
}
}
-// Check the modification time of the key and certificate -- reload if
they
changed
+// Check the modification time of the key and certificate -- reload if
either one
changed
void update_key_and_cert_if_needed(void) {
void update_key_and_cert_if_needed(void) {
- static time_t
cert
_mtime = 0;
+ static time_t
previous
_mtime = 0;
struct stat keystat;
struct stat certstat;
struct stat keystat;
struct stat certstat;
@@
-99,9
+99,9
@@
void update_key_and_cert_if_needed(void) {
return;
}
return;
}
- if ((keystat.st_mtime
> cert_mtime) || (certstat.st_mtime > cert_mtime)
) {
+ if ((keystat.st_mtime
+ certstat.st_mtime) != previous_mtime
) {
bind_to_key_and_certificate();
bind_to_key_and_certificate();
-
cert_mtime =
certstat.st_mtime;
+
previous_mtime = keystat.st_mtime +
certstat.st_mtime;
}
}
}
}