aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mod_gnutls.h.in45
1 files changed, 38 insertions, 7 deletions
diff --git a/include/mod_gnutls.h.in b/include/mod_gnutls.h.in
index 3473bf1..11c35aa 100644
--- a/include/mod_gnutls.h.in
+++ b/include/mod_gnutls.h.in
@@ -76,24 +76,35 @@ typedef struct
76 apr_size_t lua_bytecode_len; 76 apr_size_t lua_bytecode_len;
77} mgs_dirconf_rec; 77} mgs_dirconf_rec;
78 78
79
80/* The maximum number of client CA certificates allowed.
81 */
82#define MAX_CA_CRTS 128
83#define MAX_CIPHERS 16
84
79typedef struct 85typedef struct
80{ 86{
81 gnutls_certificate_credentials_t certs; 87 gnutls_certificate_credentials_t certs;
88 gnutls_srp_server_credentials_t srp_creds;
89 gnutls_anon_server_credentials_t anon_creds;
82 char* cert_cn; 90 char* cert_cn;
83 gnutls_x509_crt_t cert_x509; 91 gnutls_x509_crt_t cert_x509;
84 gnutls_x509_privkey_t privkey_x509; 92 gnutls_x509_privkey_t privkey_x509;
85 int enabled; 93 int enabled;
86 int ciphers[16]; 94 /* whether to send the PEM encoded certificates
87 int key_exchange[16]; 95 * to CGIs
88 int macs[16]; 96 */
89 int protocol[16]; 97 int export_certificates_enabled;
90 int compression[16]; 98 gnutls_priority_t priorities;
91 int cert_types[16]; 99 int cache_timeout;
92 apr_time_t cache_timeout;
93 mgs_cache_e cache_type; 100 mgs_cache_e cache_type;
94 const char* cache_config; 101 const char* cache_config;
95 const char* rsa_params_file; 102 const char* rsa_params_file;
96 const char* dh_params_file; 103 const char* dh_params_file;
104 const char* srp_tpasswd_file;
105 const char* srp_tpasswd_conf_file;
106 gnutls_x509_crt_t ca_list[MAX_CA_CRTS];
107 unsigned int ca_list_size;
97 int client_verify_mode; 108 int client_verify_mode;
98} mgs_srvconf_rec; 109} mgs_srvconf_rec;
99 110
@@ -214,9 +225,25 @@ int mgs_cache_session_init(mgs_handle_t *ctxt);
214char *mgs_session_id2sz(unsigned char *id, int idlen, 225char *mgs_session_id2sz(unsigned char *id, int idlen,
215 char *str, int strsize); 226 char *str, int strsize);
216 227
228/**
229 * Convert a time_t into a Null Terminated String
230 * @param t time_t time
231 * @param str Location to store the Hex Encoded String
232 * @param strsize The Maximum Length that can be stored in str
233 */
234char *mgs_time2sz(time_t t, char *str, int strsize);
235
217 236
218/* Configuration Functions */ 237/* Configuration Functions */
219 238
239const char *mgs_set_srp_tpasswd_conf_file(cmd_parms * parms, void *dummy,
240 const char *arg);
241const char *mgs_set_srp_tpasswd_file(cmd_parms * parms, void *dummy,
242 const char *arg);
243const char *mgs_set_dh_file(cmd_parms * parms, void *dummy,
244 const char *arg);
245const char *mgs_set_rsa_export_file(cmd_parms * parms, void *dummy,
246 const char *arg);
220const char *mgs_set_cert_file(cmd_parms * parms, void *dummy, 247const char *mgs_set_cert_file(cmd_parms * parms, void *dummy,
221 const char *arg); 248 const char *arg);
222 249
@@ -237,6 +264,10 @@ const char *mgs_set_client_ca_file(cmd_parms * parms, void *dummy,
237 264
238const char *mgs_set_enabled(cmd_parms * parms, void *dummy, 265const char *mgs_set_enabled(cmd_parms * parms, void *dummy,
239 const char *arg); 266 const char *arg);
267const char *mgs_set_export_certificates_enabled(cmd_parms * parms, void *dummy,
268 const char *arg);
269const char *mgs_set_priorities(cmd_parms * parms, void *dummy,
270 const char *arg);
240 271
241const char *mgs_set_require_section(cmd_parms *cmd, 272const char *mgs_set_require_section(cmd_parms *cmd,
242 void *mconfig, const char *arg); 273 void *mconfig, const char *arg);