git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move certificate name checking to mainline, default enabled
[exim.git]
/
src
/
src
/
exim.c
diff --git
a/src/src/exim.c
b/src/src/exim.c
index 85a7c812c34ceb65caf87e9a73f772292fac027d..e0b7546663f0aa424f0587bab184a55f9ca6f7b0 100644
(file)
--- a/
src/src/exim.c
+++ b/
src/src/exim.c
@@
-12,6
+12,13
@@
Also a few functions that don't naturally fit elsewhere. */
#include "exim.h"
#include "exim.h"
+#ifdef USE_GNUTLS
+# include <gnutls/gnutls.h>
+# if GNUTLS_VERSION_NUMBER < 0x030103 && !defined(DISABLE_OCSP)
+# define DISABLE_OCSP
+# endif
+#endif
+
extern void init_lookup_list(void);
extern void init_lookup_list(void);
@@
-124,10
+131,11
@@
Returns: TRUE or FALSE
*/
BOOL
*/
BOOL
-regex_match_and_setup(const pcre *re, uschar *subject, int options, int setup)
+regex_match_and_setup(const pcre *re,
const
uschar *subject, int options, int setup)
{
int ovector[3*(EXPAND_MAXN+1)];
{
int ovector[3*(EXPAND_MAXN+1)];
-int n = pcre_exec(re, NULL, CS subject, Ustrlen(subject), 0,
+uschar * s = string_copy(subject); /* de-constifying */
+int n = pcre_exec(re, NULL, CS s, Ustrlen(s), 0,
PCRE_EOPT | options, ovector, sizeof(ovector)/sizeof(int));
BOOL yield = n >= 0;
if (n == 0) n = EXPAND_MAXN + 1;
PCRE_EOPT | options, ovector, sizeof(ovector)/sizeof(int));
BOOL yield = n >= 0;
if (n == 0) n = EXPAND_MAXN + 1;
@@
-137,7
+145,7
@@
if (yield)
expand_nmax = (setup < 0)? 0 : setup + 1;
for (nn = (setup < 0)? 0 : 2; nn < n*2; nn += 2)
{
expand_nmax = (setup < 0)? 0 : setup + 1;
for (nn = (setup < 0)? 0 : 2; nn < n*2; nn += 2)
{
- expand_nstring[expand_nmax] = s
ubject
+ ovector[nn];
+ expand_nstring[expand_nmax] = s + ovector[nn];
expand_nlength[expand_nmax++] = ovector[nn+1] - ovector[nn];
}
expand_nmax--;
expand_nlength[expand_nmax++] = ovector[nn+1] - ovector[nn];
}
expand_nmax--;
@@
-405,11
+413,11
@@
if (exim_tvcmp(&now_tv, then_tv) <= 0)
{
if (!running_in_test_harness)
{
{
if (!running_in_test_harness)
{
- debug_printf("tick check:
%lu.%06lu %lu
.%06lu\n",
+ debug_printf("tick check:
" TIME_T_FMT ".%06lu " TIME_T_FMT "
.%06lu\n",
then_tv->tv_sec, (long) then_tv->tv_usec,
now_tv.tv_sec, (long) now_tv.tv_usec);
then_tv->tv_sec, (long) then_tv->tv_usec,
now_tv.tv_sec, (long) now_tv.tv_usec);
- debug_printf("waiting
%lu.%06lu\n", itval.it_value.tv_sec
,
- (long) itval.it_value.tv_usec);
+ debug_printf("waiting
" TIME_T_FMT ".%06lu\n"
,
+
itval.it_value.tv_sec,
(long) itval.it_value.tv_usec);
}
}
}
}
@@
-839,15
+847,12
@@
fprintf(f, "Support for:");
#ifdef EXPERIMENTAL_PROXY
fprintf(f, " Experimental_Proxy");
#endif
#ifdef EXPERIMENTAL_PROXY
fprintf(f, " Experimental_Proxy");
#endif
-#ifdef EXPERIMENTAL_
TPDA
- fprintf(f, " Experimental_
TPDA
");
+#ifdef EXPERIMENTAL_
EVENT
+ fprintf(f, " Experimental_
Event
");
#endif
#ifdef EXPERIMENTAL_REDIS
fprintf(f, " Experimental_Redis");
#endif
#endif
#ifdef EXPERIMENTAL_REDIS
fprintf(f, " Experimental_Redis");
#endif
-#ifdef EXPERIMENTAL_CERTNAMES
- fprintf(f, " Experimental_Certnames");
-#endif
#ifdef EXPERIMENTAL_DSN
fprintf(f, " Experimental_DSN");
#endif
#ifdef EXPERIMENTAL_DSN
fprintf(f, " Experimental_DSN");
#endif
@@
-2676,7
+2681,7
@@
for (i = 1; i < argc; i++)
#ifdef EXPERIMENTAL_DSN
/* -MCD: set the smtp_use_dsn flag; this indicates that the host
that exim is connected to supports the esmtp extension DSN */
#ifdef EXPERIMENTAL_DSN
/* -MCD: set the smtp_use_dsn flag; this indicates that the host
that exim is connected to supports the esmtp extension DSN */
- else if (strcmp(argrest, "CD") == 0)
+ else if (
U
strcmp(argrest, "CD") == 0)
{
smtp_use_dsn = TRUE;
break;
{
smtp_use_dsn = TRUE;
break;