1 | /** |
---|
2 | * Copyright 2004-2005 Paul Querna |
---|
3 | * Copyright 2014 Nikos Mavrogiannopoulos |
---|
4 | * Copyright 2015-2016 Thomas Klute |
---|
5 | * |
---|
6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
---|
7 | * you may not use this file except in compliance with the License. |
---|
8 | * You may obtain a copy of the License at |
---|
9 | * |
---|
10 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
11 | * |
---|
12 | * Unless required by applicable law or agreed to in writing, software |
---|
13 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
15 | * See the License for the specific language governing permissions and |
---|
16 | * limitations under the License. |
---|
17 | * |
---|
18 | */ |
---|
19 | |
---|
20 | #ifndef __MOD_GNUTLS_CACHE_H__ |
---|
21 | #define __MOD_GNUTLS_CACHE_H__ |
---|
22 | |
---|
23 | #include "mod_gnutls.h" |
---|
24 | #include <httpd.h> |
---|
25 | |
---|
26 | /** |
---|
27 | * Init the Cache after Configuration is done |
---|
28 | */ |
---|
29 | int mgs_cache_post_config(apr_pool_t *p, server_rec *s, mgs_srvconf_rec *sc); |
---|
30 | |
---|
31 | /** |
---|
32 | * Init the Cache inside each Process |
---|
33 | */ |
---|
34 | int mgs_cache_child_init(apr_pool_t *p, server_rec *s, mgs_srvconf_rec *sc); |
---|
35 | |
---|
36 | /** |
---|
37 | * Setup the Session Caching |
---|
38 | */ |
---|
39 | int mgs_cache_session_init(mgs_handle_t *ctxt); |
---|
40 | |
---|
41 | #define GNUTLS_SESSION_ID_STRING_LEN \ |
---|
42 | ((GNUTLS_MAX_SESSION_ID + 1) * 2) |
---|
43 | |
---|
44 | |
---|
45 | |
---|
46 | /** |
---|
47 | * Convert a SSL Session ID into a Null Terminated Hex Encoded String |
---|
48 | * @param id raw SSL Session ID |
---|
49 | * @param idlen Length of the raw Session ID |
---|
50 | * @param str Location to store the Hex Encoded String |
---|
51 | * @param strsize The Maximum Length that can be stored in str |
---|
52 | */ |
---|
53 | char *mgs_session_id2sz(unsigned char *id, int idlen, char *str, int strsize); |
---|
54 | |
---|
55 | /** |
---|
56 | * Convert a time_t into a Null Terminated String |
---|
57 | * @param t time_t time |
---|
58 | * @param str Location to store the Hex Encoded String |
---|
59 | * @param strsize The Maximum Length that can be stored in str |
---|
60 | */ |
---|
61 | char *mgs_time2sz(time_t t, char *str, int strsize); |
---|
62 | |
---|
63 | #endif /** __MOD_GNUTLS_CACHE_H__ */ |
---|