httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1002824 [1/4] - in /httpd/httpd/trunk: ./ modules/ssl/
Date Wed, 29 Sep 2010 19:42:04 GMT
Author: sf
Date: Wed Sep 29 19:42:03 2010
New Revision: 1002824

URL: http://svn.apache.org/viewvc?rev=1002824&view=rev
Log:
Make the ssl expression parser thread-safe. It now requires bison instead of
yacc.

Also change the make file magic so that the real source file name is
embedded in the debug info.

The generated files have been created with flex 2.5.35/bison 2.4.1. The two
'no previous prototype' warnings are supposed to be fixed with the next flex
version.

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/STATUS
    httpd/httpd/trunk/modules/ssl/Makefile.in
    httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
    httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c
    httpd/httpd/trunk/modules/ssl/ssl_expr.c
    httpd/httpd/trunk/modules/ssl/ssl_expr.h
    httpd/httpd/trunk/modules/ssl/ssl_expr_eval.c
    httpd/httpd/trunk/modules/ssl/ssl_expr_parse.c
    httpd/httpd/trunk/modules/ssl/ssl_expr_parse.h
    httpd/httpd/trunk/modules/ssl/ssl_expr_parse.y
    httpd/httpd/trunk/modules/ssl/ssl_expr_scan.c
    httpd/httpd/trunk/modules/ssl/ssl_expr_scan.l

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Sep 29 19:42:03 2010
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.9
 
+  *) mod_ssl: Make the ssl expression parser thread-safe. It now requires
+     bison instead of yacc. [Stefan Fritsch]
+
   *) mod_disk_cache: Change on-disk header file format to support the
      link of the device/inode of the data file to the matching header
      file, and to support the option of not writing a data file when

Modified: httpd/httpd/trunk/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/STATUS?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/STATUS (original)
+++ httpd/httpd/trunk/STATUS Wed Sep 29 19:42:03 2010
@@ -360,12 +360,6 @@ TODO ISSUES REMAINING IN MOD_SSL:
 
   * Do we need SSL_set_read_ahead()?
 
-  * the ssl_expr api is NOT THREAD SAFE.  race conditions exist:
-     -in ssl_expr_comp() if SSLRequire is used in .htaccess
-      (ssl_expr_info is global)
-     -is ssl_expr_eval() if there is an error
-      (ssl_expr_error is global)
-
   * SSLRequire directive (parsing of) leaks memory
 
   * Diffie-Hellman-Parameters for temporary keys are hardcoded in

Modified: httpd/httpd/trunk/modules/ssl/Makefile.in
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/Makefile.in?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/Makefile.in (original)
+++ httpd/httpd/trunk/modules/ssl/Makefile.in Wed Sep 29 19:42:03 2010
@@ -25,15 +25,13 @@ include $(top_srcdir)/build/special.mk
 #
 
 ssl_expr_scan.c: $(top_srcdir)/modules/ssl/ssl_expr_scan.l ssl_expr_parse.h
-	flex -Pssl_expr_yy -s -B $(top_srcdir)/modules/ssl/ssl_expr_scan.l
-	sed -e '/$$Header:/d' -e "s|\"`pwd`/|\"|g" <lex.ssl_expr_yy.c >ssl_expr_scan.c &&
rm -f lex.ssl_expr_yy.c
+	flex -Pssl_expr_yy -o ssl_expr_scan.c ssl_expr_scan.l
+	mv ssl_expr_scan.c ssl_expr_scan.c.tmp
+	sed -e "s|\"`pwd`/|\"|g" <ssl_expr_scan.c.tmp >ssl_expr_scan.c
+	rm -f ssl_expr_scan.c.tmp
 
 ssl_expr_parse.c ssl_expr_parse.h: $(top_srcdir)/modules/ssl/ssl_expr_parse.y
-	yacc -d $(top_srcdir)/modules/ssl/ssl_expr_parse.y
-	sed -e 's;yy;ssl_expr_yy;g' \
-	    -e "s|\"`pwd`/|\"|g" \
-	    -e '/#if defined(c_plusplus) || defined(__cplusplus)/,/#endif/d' \
-	    <y.tab.c >ssl_expr_parse.c && rm -f y.tab.c
-	sed -e 's;yy;ssl_expr_yy;g' \
-	    <y.tab.h >ssl_expr_parse.h && rm -f y.tab.h
-
+	bison -pssl_expr_yy --defines=ssl_expr_parse.h -o ssl_expr_parse.c ssl_expr_parse.y
+	mv ssl_expr_parse.c ssl_expr_parse.c.tmp
+	sed -e "s|\"`pwd`/|\"|g" < ssl_expr_parse.c.tmp > ssl_expr_parse.c
+	rm -f ssl_expr_parse.c.tmp

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_config.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_config.c?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_config.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_config.c Wed Sep 29 19:42:03 2010
@@ -1149,10 +1149,10 @@ const char *ssl_cmd_SSLRequire(cmd_parms
     SSLDirConfigRec *dc = (SSLDirConfigRec *)dcfg;
     ssl_expr *expr;
     ssl_require_t *require;
+    const char *errstring;
 
-    if (!(expr = ssl_expr_comp(cmd->pool, (char *)arg))) {
-        return apr_pstrcat(cmd->pool, "SSLRequire: ",
-                           ssl_expr_get_error(), NULL);
+    if (!(expr = ssl_expr_comp(cmd->pool, (char *)arg, &errstring))) {
+        return apr_pstrcat(cmd->pool, "SSLRequire: ", errstring, NULL);
     }
 
     require = apr_array_push(dc->aRequirement);

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_kernel.c Wed Sep 29 19:42:03 2010
@@ -899,13 +899,14 @@ int ssl_hook_Access(request_rec *r)
 
     for (i = 0; i < requires->nelts; i++) {
         ssl_require_t *req = &ssl_requires[i];
-        ok = ssl_expr_exec(r, req->mpExpr);
+        const char *errstring;
+        ok = ssl_expr_exec(r, req->mpExpr, &errstring);
 
         if (ok < 0) {
             cp = apr_psprintf(r->pool,
                               "Failed to execute "
                               "SSL requirement expression: %s",
-                              ssl_expr_get_error());
+                              errstring);
 
             ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                           "access to %s failed, reason: %s",

Modified: httpd/httpd/trunk/modules/ssl/ssl_expr.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_expr.c?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_expr.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_expr.c Wed Sep 29 19:42:03 2010
@@ -35,47 +35,50 @@
 **  _________________________________________________________________
 */
 
-ssl_expr_info_type ssl_expr_info;
-char              *ssl_expr_error;
 
-ssl_expr *ssl_expr_comp(apr_pool_t *p, char *expr)
+ssl_expr *ssl_expr_comp(apr_pool_t *p, char *expr, const char **err)
 {
-    ssl_expr_info.pool       = p;
-    ssl_expr_info.inputbuf   = expr;
-    ssl_expr_info.inputlen   = strlen(expr);
-    ssl_expr_info.inputptr   = ssl_expr_info.inputbuf;
-    ssl_expr_info.expr       = FALSE;
+    ssl_expr_info_type context;
+    int rc;
 
-    ssl_expr_error = NULL;
-    if (ssl_expr_yyparse())
+    context.pool     = p;
+    context.inputbuf = expr;
+    context.inputlen = strlen(expr);
+    context.inputptr = context.inputbuf;
+    context.expr     = FALSE;
+    context.error    = NULL;
+
+    ssl_expr_yylex_init(&context.scanner);
+    ssl_expr_yyset_extra(&context, context.scanner);
+    rc = ssl_expr_yyparse(&context);
+    ssl_expr_yylex_destroy(context.scanner);
+    *err = context.error;
+
+    if (rc)
         return NULL;
-    return ssl_expr_info.expr;
-}
 
-char *ssl_expr_get_error(void)
-{
-    if (ssl_expr_error == NULL)
-        return "";
-    return ssl_expr_error;
+    return context.expr;
 }
 
-ssl_expr *ssl_expr_make(ssl_expr_node_op op, void *a1, void *a2)
+ssl_expr *ssl_expr_make(ssl_expr_node_op op, void *a1, void *a2,
+                        ssl_expr_info_type *context)
 {
     ssl_expr *node;
 
-    node = (ssl_expr *)apr_palloc(ssl_expr_info.pool, sizeof(ssl_expr));
+    node = (ssl_expr *)apr_palloc(context->pool, sizeof(ssl_expr));
     node->node_op   = op;
     node->node_arg1 = (char *)a1;
     node->node_arg2 = (char *)a2;
     return node;
 }
 
-int ssl_expr_exec(request_rec *r, ssl_expr *expr)
+int ssl_expr_exec(request_rec *r, ssl_expr *expr, const char **err)
 {
     BOOL rc;
 
-    rc = ssl_expr_eval(r, expr);
-    if (ssl_expr_error != NULL)
+    *err = NULL;
+    rc = ssl_expr_eval(r, expr, err);
+    if (*err != NULL)
         return (-1);
     else
         return (rc ? 1 : 0);

Modified: httpd/httpd/trunk/modules/ssl/ssl_expr.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_expr.h?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_expr.h (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_expr.h Wed Sep 29 19:42:03 2010
@@ -84,29 +84,26 @@ typedef struct {
 typedef ssl_expr_node ssl_expr;
 
 typedef struct {
-	apr_pool_t *pool;
-    char     *inputbuf;
-    int       inputlen;
-    char     *inputptr;
-    ssl_expr *expr;
+    apr_pool_t *pool;
+    char       *inputbuf;
+    int         inputlen;
+    char       *inputptr;
+    ssl_expr   *expr;
+    void       *scanner;
+    char       *error;
 } ssl_expr_info_type;
 
-extern ssl_expr_info_type ssl_expr_info;
-extern char *ssl_expr_error;
-
-#define yylval  ssl_expr_yylval
-#define yyerror ssl_expr_yyerror
-#define yyinput ssl_expr_yyinput
-
-extern int ssl_expr_yyparse(void);
-extern int ssl_expr_yyerror(char *);
-extern int ssl_expr_yylex(void);
-
-extern ssl_expr *ssl_expr_comp(apr_pool_t *, char *);
-extern int       ssl_expr_exec(request_rec *, ssl_expr *);
-extern char     *ssl_expr_get_error(void);
-extern ssl_expr *ssl_expr_make(ssl_expr_node_op, void *, void *);
-extern BOOL      ssl_expr_eval(request_rec *, ssl_expr *);
+int  ssl_expr_yyparse(ssl_expr_info_type *context);
+int  ssl_expr_yyerror(ssl_expr_info_type *context, char *errstring);
+int  ssl_expr_yylex_init(void **scanner);
+int  ssl_expr_yylex_destroy(void *scanner);
+void ssl_expr_yyset_extra(ssl_expr_info_type *context, void *scanner);
+
+ssl_expr *ssl_expr_comp(apr_pool_t *p, char *exprstr, const char **err);
+int       ssl_expr_exec(request_rec *r, ssl_expr *expr, const char **err);
+ssl_expr *ssl_expr_make(ssl_expr_node_op op, void *arg1, void *arg2,
+                        ssl_expr_info_type *context);
+BOOL      ssl_expr_eval(request_rec *r, ssl_expr *expr, const char **err);
 
 #endif /* __SSL_EXPR_H__ */
 /** @} */

Modified: httpd/httpd/trunk/modules/ssl/ssl_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_expr_eval.c?rev=1002824&r1=1002823&r2=1002824&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_expr_eval.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_expr_eval.c Wed Sep 29 19:42:03 2010
@@ -34,13 +34,14 @@
 **  _________________________________________________________________
 */
 
-static BOOL  ssl_expr_eval_comp(request_rec *, ssl_expr *);
-static char *ssl_expr_eval_word(request_rec *, ssl_expr *);
-static BOOL  ssl_expr_eval_oid(request_rec *r, const char *word, const char *oidstr);
-static char *ssl_expr_eval_func_file(request_rec *, char *);
-static int   ssl_expr_eval_strcmplex(char *, char *);
+static BOOL  ssl_expr_eval_comp(request_rec *, ssl_expr *, const char **err);
+static char *ssl_expr_eval_word(request_rec *, ssl_expr *, const char **err);
+static BOOL  ssl_expr_eval_oid(request_rec *r, const char *word,
+                               const char *oidstr, const char **err);
+static char *ssl_expr_eval_func_file(request_rec *, char *, const char **err);
+static int   ssl_expr_eval_strcmplex(char *, char *, const char **err);
 
-BOOL ssl_expr_eval(request_rec *r, ssl_expr *node)
+BOOL ssl_expr_eval(request_rec *r, ssl_expr *node, const char **err)
 {
     switch (node->node_op) {
         case op_True: {
@@ -51,67 +52,67 @@ BOOL ssl_expr_eval(request_rec *r, ssl_e
         }
         case op_Not: {
             ssl_expr *e = (ssl_expr *)node->node_arg1;
-            return (!ssl_expr_eval(r, e));
+            return (!ssl_expr_eval(r, e, err));
         }
         case op_Or: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (ssl_expr_eval(r, e1) || ssl_expr_eval(r, e2));
+            return (ssl_expr_eval(r, e1, err) || ssl_expr_eval(r, e2, err));
         }
         case op_And: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (ssl_expr_eval(r, e1) && ssl_expr_eval(r, e2));
+            return (ssl_expr_eval(r, e1, err) && ssl_expr_eval(r, e2, err));
         }
         case op_Comp: {
             ssl_expr *e = (ssl_expr *)node->node_arg1;
-            return ssl_expr_eval_comp(r, e);
+            return ssl_expr_eval_comp(r, e, err);
         }
         default: {
-            ssl_expr_error = "Internal evaluation error: Unknown expression node";
+            *err = "Internal evaluation error: Unknown expression node";
             return FALSE;
         }
     }
 }
 
-static BOOL ssl_expr_eval_comp(request_rec *r, ssl_expr *node)
+static BOOL ssl_expr_eval_comp(request_rec *r, ssl_expr *node, const char **err)
 {
     switch (node->node_op) {
         case op_EQ: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (strcmp(ssl_expr_eval_word(r, e1), ssl_expr_eval_word(r, e2)) == 0);
+            return (strcmp(ssl_expr_eval_word(r, e1, err), ssl_expr_eval_word(r, e2, err))
== 0);
         }
         case op_NE: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (strcmp(ssl_expr_eval_word(r, e1), ssl_expr_eval_word(r, e2)) != 0);
+            return (strcmp(ssl_expr_eval_word(r, e1, err), ssl_expr_eval_word(r, e2, err))
!= 0);
         }
         case op_LT: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1), ssl_expr_eval_word(r,
e2)) <  0);
+            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1, err), ssl_expr_eval_word(r,
e2, err), err) <  0);
         }
         case op_LE: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1), ssl_expr_eval_word(r,
e2)) <= 0);
+            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1, err), ssl_expr_eval_word(r,
e2, err), err) <= 0);
         }
         case op_GT: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1), ssl_expr_eval_word(r,
e2)) >  0);
+            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1, err), ssl_expr_eval_word(r,
e2, err), err) >  0);
         }
         case op_GE: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
-            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1), ssl_expr_eval_word(r,
e2)) >= 0);
+            return (ssl_expr_eval_strcmplex(ssl_expr_eval_word(r, e1, err), ssl_expr_eval_word(r,
e2, err), err) >= 0);
         }
         case op_IN: {
             ssl_expr *e1 = (ssl_expr *)node->node_arg1;
             ssl_expr *e2 = (ssl_expr *)node->node_arg2;
             ssl_expr *e3;
-            char *w1 = ssl_expr_eval_word(r, e1);
+            char *w1 = ssl_expr_eval_word(r, e1, err);
             BOOL found = FALSE;
             do {
                 ssl_expr_node_op op = e2->node_op;
@@ -119,15 +120,15 @@ static BOOL ssl_expr_eval_comp(request_r
                 e2 = (ssl_expr *)e2->node_arg2;
 
                 if (op == op_PeerExtElement) {
-                    char *w3 = ssl_expr_eval_word(r, e3);
+                    char *w3 = ssl_expr_eval_word(r, e3, err);
 
-                    found = ssl_expr_eval_oid(r, w1, w3);
+                    found = ssl_expr_eval_oid(r, w1, w3, err);
 
                     /* There will be no more nodes on the list, so the result is authoritative
*/
                     break;
                 }
 
-                if (strcmp(w1, ssl_expr_eval_word(r, e3)) == 0) {
+                if (strcmp(w1, ssl_expr_eval_word(r, e3, err)) == 0) {
                     found = TRUE;
                     break;
                 }
@@ -142,7 +143,7 @@ static BOOL ssl_expr_eval_comp(request_r
 
             e1 = (ssl_expr *)node->node_arg1;
             e2 = (ssl_expr *)node->node_arg2;
-            word = ssl_expr_eval_word(r, e1);
+            word = ssl_expr_eval_word(r, e1, err);
             regex = (ap_regex_t *)(e2->node_arg1);
             return (ap_regexec(regex, word, 0, NULL, 0) == 0);
         }
@@ -154,18 +155,18 @@ static BOOL ssl_expr_eval_comp(request_r
 
             e1 = (ssl_expr *)node->node_arg1;
             e2 = (ssl_expr *)node->node_arg2;
-            word = ssl_expr_eval_word(r, e1);
+            word = ssl_expr_eval_word(r, e1, err);
             regex = (ap_regex_t *)(e2->node_arg1);
             return !(ap_regexec(regex, word, 0, NULL, 0) == 0);
         }
         default: {
-            ssl_expr_error = "Internal evaluation error: Unknown expression node";
+            *err = "Internal evaluation error: Unknown expression node";
             return FALSE;
         }
     }
 }
 
-static char *ssl_expr_eval_word(request_rec *r, ssl_expr *node)
+static char *ssl_expr_eval_word(request_rec *r, ssl_expr *node, const char **err)
 {
     switch (node->node_op) {
         case op_Digit: {
@@ -185,20 +186,21 @@ static char *ssl_expr_eval_word(request_
             char *name = (char *)node->node_arg1;
             ssl_expr *args = (ssl_expr *)node->node_arg2;
             if (strEQ(name, "file"))
-                return ssl_expr_eval_func_file(r, (char *)(args->node_arg1));
+                return ssl_expr_eval_func_file(r, (char *)(args->node_arg1), err);
             else {
-                ssl_expr_error = "Internal evaluation error: Unknown function name";
+                *err = "Internal evaluation error: Unknown function name";
                 return "";
             }
         }
         default: {
-            ssl_expr_error = "Internal evaluation error: Unknown expression node";
+            *err = "Internal evaluation error: Unknown expression node";
             return FALSE;
         }
     }
 }
 
-static BOOL ssl_expr_eval_oid(request_rec *r, const char *word, const char *oidstr)
+static BOOL ssl_expr_eval_oid(request_rec *r, const char *word,
+                              const char *oidstr, const char **err)
 {
     int j;
     BOOL result = FALSE;
@@ -220,7 +222,7 @@ static BOOL ssl_expr_eval_oid(request_re
 }
 
 
-static char *ssl_expr_eval_func_file(request_rec *r, char *filename)
+static char *ssl_expr_eval_func_file(request_rec *r, char *filename, const char **err)
 {
     apr_file_t *fp;
     char *buf;
@@ -230,12 +232,12 @@ static char *ssl_expr_eval_func_file(req
 
     if (apr_file_open(&fp, filename, APR_READ|APR_BUFFERED,
                       APR_OS_DEFAULT, r->pool) != APR_SUCCESS) {
-        ssl_expr_error = "Cannot open file";
+        *err = "Cannot open file";
         return "";
     }
     apr_file_info_get(&finfo, APR_FINFO_SIZE, fp);
     if ((finfo.size + 1) != ((apr_size_t)finfo.size + 1)) {
-        ssl_expr_error = "Huge file cannot be read";
+        *err = "Huge file cannot be read";
         apr_file_close(fp);
         return "";
     }
@@ -246,14 +248,14 @@ static char *ssl_expr_eval_func_file(req
     }
     else {
         if ((buf = (char *)apr_palloc(r->pool, sizeof(char)*(len+1))) == NULL) {
-            ssl_expr_error = "Cannot allocate memory";
+            *err = "Cannot allocate memory";
             apr_file_close(fp);
             return "";
         }
         offset = 0;
         apr_file_seek(fp, APR_SET, &offset);
         if (apr_file_read(fp, buf, &len) != APR_SUCCESS) {
-            ssl_expr_error = "Cannot read from file";
+            *err = "Cannot read from file";
             apr_file_close(fp);
             return "";
         }
@@ -264,7 +266,7 @@ static char *ssl_expr_eval_func_file(req
 }
 
 /* a variant of strcmp(3) which works correctly also for number strings */
-static int ssl_expr_eval_strcmplex(char *cpNum1, char *cpNum2)
+static int ssl_expr_eval_strcmplex(char *cpNum1, char *cpNum2, const char **err)
 {
     int i, n1, n2;
 



Mime
View raw message