]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/tls.c
As client, request PRDR by default if the server offers it
[user/henk/code/exim.git] / src / src / tls.c
index cb7efffe9b4ccff06fcd386e28f6707e3f908c8c..305eaa410c9b7e91901012b380b2f532dce2ac9b 100644 (file)
@@ -80,6 +80,28 @@ return TRUE;
 }
 
 
+/*************************************************
+*        Timezone environment flipping           *
+*************************************************/
+
+static uschar *
+to_tz(uschar * tz)
+{
+  uschar * old = US getenv("TZ");
+  setenv("TZ", CS tz, 1);
+  tzset(); 
+  return old;
+}
+static void
+restore_tz(uschar * tz)
+{
+  if (tz)
+    setenv("TZ", CS tz, 1);
+  else
+    unsetenv("TZ");
+  tzset(); 
+}
+
 /*************************************************
 *        Many functions are package-specific     *
 *************************************************/
@@ -313,10 +335,9 @@ if ((altnames = tls_cert_subject_altname(cert, US"dns")))
 else if ((subjdn = tls_cert_subject(cert, NULL)))
   {
   int sn_sep = ',';
-  uschar * sn;
 
   dn_to_list(subjdn);
-  while (cmpname = string_nextinlist(&namelist, &cmp_sep, NULL, 0))
+  while ((cmpname = string_nextinlist(&namelist, &cmp_sep, NULL, 0)))
     {
     uschar * sn = subjdn;
     while ((certname = string_nextinlist(&sn, &sn_sep, NULL, 0)))