Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ssl_ct_util.h
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  */
16 
17 #ifndef SSL_CT_UTIL_H
18 #define SSL_CT_UTIL_H
19 
20 #include "httpd.h"
21 
22 apr_status_t ctutil_path_join(char **out, const char *dirname, const char *basename,
23  apr_pool_t *p, server_rec *s);
24 
25 int ctutil_dir_exists(apr_pool_t *p, const char *dirname);
26 
27 int ctutil_file_exists(apr_pool_t *p, const char *filename);
28 
29 void ctutil_buffer_to_array(apr_pool_t *p, const char *b,
30  apr_size_t b_size, apr_array_header_t **out);
31 
32 apr_status_t ctutil_fopen(const char *fn, const char *mode, FILE **f);
33 
35  server_rec *s,
36  const char *dirname,
37  const char *pattern,
38  apr_array_header_t **outarr);
39 
41  server_rec *s,
42  const char *fn,
43  apr_off_t limit,
44  char **contents,
45  apr_size_t *contents_size);
46 
48  server_rec *s,
49  const char *args[8],
50  const char *desc_for_log);
51 
54 
56  apr_file_t *f,
57  apr_uint16_t val);
58 
60  apr_file_t *f,
61  apr_uint32_t val);
62 
63 void ctutil_log_array(const char *file, int line, int module_index,
64  int level, server_rec *s, const char *desc,
65  apr_array_header_t *arr);
66 
67 apr_status_t ctutil_read_var_bytes(const unsigned char **mem,
68  apr_size_t *avail,
69  const unsigned char **start,
70  apr_size_t *len);
71 
72 apr_status_t ctutil_deserialize_uint64(const unsigned char **mem,
73  apr_size_t *avail, apr_uint64_t *pval);
74 apr_status_t ctutil_deserialize_uint16(const unsigned char **mem,
75  apr_size_t *avail,
76  apr_uint16_t *pval);
77 
78 apr_status_t ctutil_serialize_uint64(unsigned char **mem, apr_size_t *avail,
79  apr_uint64_t val);
80 
81 apr_status_t ctutil_serialize_uint24(unsigned char **mem, apr_size_t *avail,
82  apr_uint32_t val);
83 
84 apr_status_t ctutil_serialize_uint16(unsigned char **mem, apr_size_t *avail,
85  apr_uint16_t val);
86 
87 apr_status_t ctutil_serialize_uint8(unsigned char **mem, apr_size_t *avail,
88  unsigned char val);
89 
90 apr_status_t ctutil_write_var16_bytes(unsigned char **mem, apr_size_t *avail,
91  const unsigned char *val,
92  apr_uint16_t len);
93 
94 apr_status_t ctutil_write_var24_bytes(unsigned char **mem, apr_size_t *avail,
95  const unsigned char *val,
96  apr_uint32_t len);
97 
99 
100 #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)
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:1311
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:477
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)