1 /* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * _ __ ___ ___ __| | ___ ___| | mod_ssl
19 * | '_ ` _ \ / _ \ / _` | / __/ __| | Apache Interface to OpenSSL
20 * | | | | | | (_) | (_| | \__ \__ \ |
21 * |_| |_| |_|\___/ \__,_|___|___/___/_|
26 /* ``It is hard to fly with
27 the eagles when you work
32 /* _________________________________________________________________
34 ** Expression Handling
35 ** _________________________________________________________________
38 ssl_expr_info_type ssl_expr_info;
41 ssl_expr *ssl_expr_comp(apr_pool_t *p, char *expr)
43 ssl_expr_info.pool = p;
44 ssl_expr_info.inputbuf = expr;
45 ssl_expr_info.inputlen = strlen(expr);
46 ssl_expr_info.inputptr = ssl_expr_info.inputbuf;
47 ssl_expr_info.expr = FALSE;
49 ssl_expr_error = NULL;
50 if (ssl_expr_yyparse())
52 return ssl_expr_info.expr;
55 char *ssl_expr_get_error(void)
57 if (ssl_expr_error == NULL)
59 return ssl_expr_error;
62 ssl_expr *ssl_expr_make(ssl_expr_node_op op, void *a1, void *a2)
66 node = (ssl_expr *)apr_palloc(ssl_expr_info.pool, sizeof(ssl_expr));
68 node->node_arg1 = (char *)a1;
69 node->node_arg2 = (char *)a2;
73 int ssl_expr_exec(request_rec *r, ssl_expr *expr)
77 rc = ssl_expr_eval(r, expr);
78 if (ssl_expr_error != NULL)