]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
tell the user what time _they_ are too, when a cert is expired
authorRoger Dingledine <arma@torproject.org>
Thu, 22 Jul 2004 23:06:28 +0000 (23:06 +0000)
committerRoger Dingledine <arma@torproject.org>
Thu, 22 Jul 2004 23:06:28 +0000 (23:06 +0000)
svn:r2114

src/common/tortls.c

index a5c4fb967325bb002cd281e17262dfef86fa8c0b..78dea3b944da2bf8f76f9fe3385ea65be0832353 100644 (file)
@@ -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)