diff options
author | Roger Dingledine <arma@torproject.org> | 2004-07-22 23:06:28 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-07-22 23:06:28 +0000 |
commit | 3aaba3b16e22cbda968097d242b10d5b5f4e13d7 (patch) | |
tree | 58b5378abb3b52160688b0e59f62cae05bf89084 /src | |
parent | a45090971611a3cf46a91cfff75a63858382f9fb (diff) | |
download | tor-3aaba3b16e22cbda968097d242b10d5b5f4e13d7.tar.gz tor-3aaba3b16e22cbda968097d242b10d5b5f4e13d7.zip |
tell the user what time _they_ are too, when a cert is expired
svn:r2114
Diffstat (limited to 'src')
-rw-r--r-- | src/common/tortls.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index a5c4fb9673..78dea3b944 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -619,6 +619,8 @@ static void log_cert_lifetime(X509 *cert, const char *problem) BIO *bio = NULL; BUF_MEM *buf; char *s1=NULL, *s2=NULL; + char mytime[33]; + time_t now = time(NULL); if (problem) log_fn(LOG_WARN,"Certificate %s: is your system clock set incorrectly?", @@ -642,7 +644,9 @@ static void log_cert_lifetime(X509 *cert, const char *problem) BIO_get_mem_ptr(bio, &buf); s2 = tor_strndup(buf->data, buf->length); - log_fn(LOG_WARN, " (certificate lifetime runs from %s through %s)",s1,s2); + strftime(mytime, 32, "%b %d %H:%M:%S %Y GMT", gmtime(&now)); + + log_fn(LOG_WARN, "(certificate lifetime runs from %s through %s. Your time is %s.)",s1,s2,mytime); end: if (bio) |