All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Go to the documentation of this file.
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
17 #ifndef SSL_CT_UTIL_H
18 #define SSL_CT_UTIL_H
20 #include "httpd.h"
22 apr_status_t ctutil_path_join(char **out, const char *dirname, const char *basename,
23  apr_pool_t *p, server_rec *s);
25 int ctutil_dir_exists(apr_pool_t *p, const char *dirname);
27 int ctutil_file_exists(apr_pool_t *p, const char *filename);
29 void ctutil_buffer_to_array(apr_pool_t *p, const char *b,
30  apr_size_t b_size, apr_array_header_t **out);
32 int ctutil_in_array(const char *needle, const apr_array_header_t *haystack);
34 apr_status_t ctutil_fopen(const char *fn, const char *mode, FILE **f);
37  server_rec *s,
38  const char *dirname,
39  const char *pattern,
40  apr_array_header_t **outarr);
43  server_rec *s,
44  const char *fn,
45  apr_off_t limit,
46  char **contents,
47  apr_size_t *contents_size);
50  server_rec *s,
51  const char *args[8],
52  const char *desc_for_log);
58  apr_file_t *f,
59  apr_uint16_t val);
62  apr_file_t *f,
63  apr_uint32_t val);
65 void ctutil_log_array(const char *file, int line, int module_index,
66  int level, server_rec *s, const char *desc,
67  apr_array_header_t *arr);
69 apr_status_t ctutil_read_var_bytes(const unsigned char **mem,
70  apr_size_t *avail,
71  const unsigned char **start,
72  apr_size_t *len);
74 apr_status_t ctutil_deserialize_uint64(const unsigned char **mem,
75  apr_size_t *avail, apr_uint64_t *pval);
76 apr_status_t ctutil_deserialize_uint16(const unsigned char **mem,
77  apr_size_t *avail,
78  apr_uint16_t *pval);
80 apr_status_t ctutil_serialize_uint64(unsigned char **mem, apr_size_t *avail,
81  apr_uint64_t val);
83 apr_status_t ctutil_serialize_uint24(unsigned char **mem, apr_size_t *avail,
84  apr_uint32_t val);
86 apr_status_t ctutil_serialize_uint16(unsigned char **mem, apr_size_t *avail,
87  apr_uint16_t val);
89 apr_status_t ctutil_serialize_uint8(unsigned char **mem, apr_size_t *avail,
90  unsigned char val);
92 apr_status_t ctutil_write_var16_bytes(unsigned char **mem, apr_size_t *avail,
93  const unsigned char *val,
94  apr_uint16_t len);
96 apr_status_t ctutil_write_var24_bytes(unsigned char **mem, apr_size_t *avail,
97  const unsigned char *val,
98  apr_uint32_t len);
102 #endif /* SSL_CT_UTIL_H */
size_t apr_size_t
Definition: apr.h:375
void ctutil_buffer_to_array(apr_pool_t *p, const char *b, apr_size_t b_size, apr_array_header_t **out)
void ctutil_run_internal_tests(apr_pool_t *p)
Definition: apr_arch_thread_mutex.h:28
Definition: apr_arch_file_io.h:107
Definition: apr_tables.h:62
apr_status_t ctutil_serialize_uint16(unsigned char **mem, apr_size_t *avail, apr_uint16_t val)
apr_status_t ctutil_deserialize_uint64(const unsigned char **mem, apr_size_t *avail, apr_uint64_t *pval)
apr_status_t ctutil_serialize_uint8(unsigned char **mem, apr_size_t *avail, unsigned char val)
void ctutil_thread_mutex_unlock(apr_thread_mutex_t *m)
apr_status_t ctutil_file_write_uint16(server_rec *s, apr_file_t *f, apr_uint16_t val)
apr_status_t ctutil_read_dir(apr_pool_t *p, server_rec *s, const char *dirname, const char *pattern, apr_array_header_t **outarr)
int ctutil_in_array(const char *needle, const apr_array_header_t *haystack)
void ctutil_thread_mutex_lock(apr_thread_mutex_t *m)
int ctutil_dir_exists(apr_pool_t *p, const char *dirname)
apr_status_t ctutil_fopen(const char *fn, const char *mode, FILE **f)
unsigned short apr_uint16_t
Definition: apr.h:331
int int apr_status_t const char * desc
Definition: mod_dav.h:141
HTTP Daemon routines.
apr_status_t ctutil_write_var24_bytes(unsigned char **mem, apr_size_t *avail, const unsigned char *val, apr_uint32_t len)
A structure to store information for each virtual server.
Definition: httpd.h:1302
apr_status_t ctutil_run_to_log(apr_pool_t *p, server_rec *s, const char *args[8], const char *desc_for_log)
apr_status_t ctutil_read_var_bytes(const unsigned char **mem, apr_size_t *avail, const unsigned char **start, apr_size_t *len)
unsigned int apr_uint32_t
Definition: apr.h:334
apr_status_t ctutil_serialize_uint24(unsigned char **mem, apr_size_t *avail, apr_uint32_t val)
apr_status_t ctutil_serialize_uint64(unsigned char **mem, apr_size_t *avail, apr_uint64_t val)
apr_pool_t * p
apr_status_t ctutil_read_file(apr_pool_t *p, server_rec *s, const char *fn, apr_off_t limit, char **contents, apr_size_t *contents_size)
unsigned long apr_uint64_t
Definition: apr.h:372
apr_status_t ctutil_write_var16_bytes(unsigned char **mem, apr_size_t *avail, const unsigned char *val, apr_uint16_t len)
apr_status_t ctutil_path_join(char **out, const char *dirname, const char *basename, apr_pool_t *p, server_rec *s)
dav_buffer const void * mem
Definition: mod_dav.h:481
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int apr_status_t
Definition: apr_errno.h:44
void ctutil_log_array(const char *file, int line, int module_index, int level, server_rec *s, const char *desc, apr_array_header_t *arr)
apr_status_t ctutil_deserialize_uint16(const unsigned char **mem, apr_size_t *avail, apr_uint16_t *pval)
off_t apr_off_t
Definition: apr.h:377
int ctutil_file_exists(apr_pool_t *p, const char *filename)
apr_status_t ctutil_file_write_uint24(server_rec *s, apr_file_t *f, apr_uint32_t val)