Changeset 0fcba60 in mod_gnutls
- Timestamp:
- Dec 17, 2018, 1:05:51 PM (4 years ago)
- Branches:
- asyncio, debian/master, master, proxy-ticket
- Children:
- 68b5156
- Parents:
- f674424
- git-author:
- Fiona Klute <fiona.klute@…> (12/17/18 13:02:43)
- git-committer:
- Fiona Klute <fiona.klute@…> (12/17/18 13:05:51)
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
rf674424 r0fcba60 58 58 59 59 60 /** Default GnuTLS priority string for mod_gnutls */61 #define MGS_DEFAULT_PRIORITY "NORMAL"62 /** Compiled version of MGS_DEFAULT_PRIORITY (initialized in the63 * pre_config hook) */64 static gnutls_priority_t default_prio;65 66 60 67 61 static int mgs_cert_verify(request_rec * r, mgs_handle_t * ctxt); … … 88 82 89 83 /* Deinit default priority setting */ 90 gnutls_priority_deinit(default_prio);84 mgs_default_priority_deinit(); 91 85 return APR_SUCCESS; 92 86 } … … 143 137 144 138 /* Initialize default priority setting */ 145 ret = gnutls_priority_init(&default_prio, MGS_DEFAULT_PRIORITY, NULL);139 ret = mgs_default_priority_init(); 146 140 if (ret < 0) 147 141 { … … 731 725 s->server_hostname, s->addrs->host_port, 732 726 MGS_DEFAULT_PRIORITY); 733 sc->priorities = default_prio;727 sc->priorities = mgs_get_default_prio(); 734 728 } 735 729 … … 1181 1175 1182 1176 /* Set Default Priority */ 1183 err = gnutls_priority_set(ctxt->session, default_prio);1177 err = gnutls_priority_set(ctxt->session, mgs_get_default_prio()); 1184 1178 if (err != GNUTLS_E_SUCCESS) 1185 1179 ap_log_cerror(APLOG_MARK, APLOG_ERR, err, c, … … 2232 2226 s->server_hostname, s->addrs->host_port, 2233 2227 MGS_DEFAULT_PRIORITY); 2234 sc->proxy_priorities = default_prio;2228 sc->proxy_priorities = mgs_get_default_prio(); 2235 2229 } 2236 2230 else -
src/gnutls_util.c
rf674424 r0fcba60 19 19 #include <apr_strings.h> 20 20 #include <gnutls/gnutls.h> 21 22 23 24 /** Compiled version of MGS_DEFAULT_PRIORITY, must be initialized 25 * using mgs_default_priority_init() in the pre_config hook and 26 * deinitialized in the matching pool cleanup hook. */ 27 static gnutls_priority_t default_prio; 28 21 29 22 30 … … 153 161 return ctxt; 154 162 } 163 164 165 166 int mgs_default_priority_init() 167 { 168 return gnutls_priority_init(&default_prio, MGS_DEFAULT_PRIORITY, NULL); 169 } 170 171 172 173 gnutls_priority_t mgs_get_default_prio() 174 { 175 return default_prio; 176 } 177 178 179 180 void mgs_default_priority_deinit() 181 { 182 gnutls_priority_deinit(default_prio); 183 } -
src/gnutls_util.h
rf674424 r0fcba60 25 25 #ifndef __MOD_GNUTLS_UTIL_H__ 26 26 #define __MOD_GNUTLS_UTIL_H__ 27 28 /** Default GnuTLS priority string for mod_gnutls */ 29 #define MGS_DEFAULT_PRIORITY "NORMAL" 27 30 28 31 /** maximum allowed length of one header line */ … … 74 77 mgs_handle_t *init_gnutls_ctxt(conn_rec *c); 75 78 79 /** 80 * Initialize the global default priorities, must be called by the 81 * pre_config hook 82 * 83 * @return `GNUTLS_E_SUCCESS` or a GnuTLS error code 84 */ 85 int mgs_default_priority_init(); 86 87 /** 88 * Get the global default priorities 89 */ 90 gnutls_priority_t mgs_get_default_prio(); 91 92 /** 93 * Deinitialize the global default priorities, must be in the cleanup 94 * hook of the pre_config pool. 95 */ 96 void mgs_default_priority_deinit(); 97 76 98 #endif /* __MOD_GNUTLS_UTIL_H__ */
Note: See TracChangeset
for help on using the changeset viewer.