Changeset 104e881 in mod_gnutls
- Timestamp:
- Dec 6, 2016, 2:13:55 AM (6 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, main, master, proxy-ticket, upstream
- Children:
- e0e0b0f
- Parents:
- 14548b9
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
include/mod_gnutls.h.in
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2004-2005 Paul Querna 3 3 * Copyright 2014 Nikos Mavrogiannopoulos … … 15 15 * See the License for the specific language governing permissions and 16 16 * limitations under the License. 17 *18 17 */ 19 18 -
src/gnutls_cache.h
r14548b9 r104e881 20 20 * @file 21 21 * 22 * Generic object cache for mod_gnutls 22 * Generic object cache for mod_gnutls. 23 23 */ 24 24 … … 37 37 * function is called after the configuration file(s) have been 38 38 * parsed. 39 * 40 * @param p configuration memory pool 41 * @param s default server of the Apache configuration, head of the 42 * server list 43 * @param sc mod_gnutls data associated with `s` 39 44 */ 40 45 int mgs_cache_post_config(apr_pool_t *p, server_rec *s, mgs_srvconf_rec *sc); 41 46 42 47 /** 43 * (Re-)Initialize the cache in a child process after forking 48 * (Re-)Initialize the cache in a child process after forking. 49 * 50 * @param p child memory pool provided by Apache 51 * @param s default server of the Apache configuration, head of the 52 * server list 53 * @param sc mod_gnutls data associated with `s` 44 54 */ 45 55 int mgs_cache_child_init(apr_pool_t *p, server_rec *s, mgs_srvconf_rec *sc); 46 56 47 57 /** 48 * Set up caching for the given TLS session58 * Set up caching for the given TLS session. 49 59 * 50 60 * @param ctxt mod_gnutls session context 61 * 51 62 * @return 0 52 63 */ … … 57 68 /** 58 69 * Convert a `time_t` into a null terminated string in a format 59 * compatible with OpenSSL's `ASN1_TIME_print()` 70 * compatible with OpenSSL's `ASN1_TIME_print()`. 60 71 * 61 72 * @param t time_t time 62 73 * @param str Location to store the time string 63 74 * @param strsize The maximum length that can be stored in `str` 75 * 64 76 * @return `str` 65 77 */ … … 67 79 68 80 /** 69 * Generic store function for the mod_gnutls object cache 81 * Generic store function for the mod_gnutls object cache. 70 82 * 71 83 * @param s server associated with the cache entry … … 73 85 * @param data data to be cached 74 86 * @param expiry expiration time 75 * @return -1 on error, 0 on success 87 * 88 * @return `-1` on error, `0` on success 76 89 */ 77 90 typedef int (*cache_store_func)(server_rec *s, gnutls_datum_t key, 78 91 gnutls_datum_t data, apr_time_t expiry); 79 92 /** 80 * Generic fetch function for the mod_gnutls object cache 93 * Generic fetch function for the mod_gnutls object cache. 94 * 95 * *Warning*: The `data` element of the returned `gnutls_datum_t` is 96 * allocated using `gnutls_malloc()` for compatibility with the GnuTLS 97 * session caching API, and must be released using `gnutls_free()`. 81 98 * 82 99 * @param ctxt mod_gnutls session context for the request 83 100 * @param key key for the cache entry to be fetched 101 * 84 102 * @return the requested cache entry, or `{NULL, 0}` 85 103 */ -
src/gnutls_config.c
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2004-2005 Paul Querna 3 3 * Copyright 2008, 2014 Nikos Mavrogiannopoulos … … 16 16 * See the License for the specific language governing permissions and 17 17 * limitations under the License. 18 *19 18 */ 20 19 -
src/gnutls_config.h
r14548b9 r104e881 13 13 * See the License for the specific language governing permissions and 14 14 * limitations under the License. 15 *16 15 */ 17 16 -
src/gnutls_hooks.c
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2004-2005 Paul Querna 3 3 * Copyright 2008, 2014 Nikos Mavrogiannopoulos … … 17 17 * See the License for the specific language governing permissions and 18 18 * limitations under the License. 19 *20 19 */ 21 20 … … 44 43 ((c->is_proxy == GNUTLS_ENABLED_TRUE) ? "proxy " : "") 45 44 45 /** Key to encrypt session tickets. Must be kept secret. This key is 46 * generated in the `pre_config` hook and thus constant across 47 * forks. The problem with this approach is that it does not support 48 * regular key rotation. */ 46 49 static gnutls_datum_t session_ticket_key = {NULL, 0}; 47 50 … … 310 313 } 311 314 312 /* 315 /** 316 * Post config hook. 317 * 313 318 * Must return OK or DECLINED on success, something else on 314 319 * error. These codes are defined in Apache httpd.h along with the … … 614 619 * @param x vhost callback record 615 620 * @param s server record 621 * @param tsc mod_gnutls server data for `s` 622 * 616 623 * @return true if a match, false otherwise 617 624 * 618 625 */ 619 int check_server_aliases(vhost_cb_rec *x, server_rec * s, mgs_srvconf_rec *tsc) { 626 int check_server_aliases(vhost_cb_rec *x, server_rec * s, mgs_srvconf_rec *tsc) 627 { 620 628 apr_array_header_t *names; 621 629 int rv = 0; -
src/gnutls_io.c
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2004-2005 Paul Querna 3 3 * Copyright 2008 Nikos Mavrogiannopoulos … … 16 16 * See the License for the specific language governing permissions and 17 17 * limitations under the License. 18 *19 18 */ 20 19 … … 30 29 31 30 /** 31 * @file 32 32 * Describe how the GnuTLS Filter system works here 33 33 * - Basicly the same as what mod_ssl does with OpenSSL. -
src/gnutls_ocsp.c
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2016 Thomas Klute 3 3 * … … 31 31 #endif 32 32 33 /* maximum supported OCSP response size, 8K should be plenty */33 /** maximum supported OCSP response size, 8K should be plenty */ 34 34 #define OCSP_RESP_SIZE_MAX (8 * 1024) 35 35 #define OCSP_REQ_TYPE "application/ocsp-request" 36 36 #define OCSP_RESP_TYPE "application/ocsp-response" 37 37 38 /* Dummy data for failure cache entries (one byte). */38 /** Dummy data for failure cache entries (one byte). */ 39 39 #define OCSP_FAILURE_CACHE_DATA 0x0f 40 40 … … 43 43 ap_log_error(APLOG_MARK, APLOG_INFO, APR_EGENERAL, (srv), \ 44 44 "Reason for failed OCSP response verification: %s", (str)) 45 /* 45 /** 46 46 * Log all matching reasons for verification failure 47 47 */ -
src/gnutls_ocsp.h
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2016 Thomas Klute 3 3 * … … 25 25 #define MGS_OCSP_MUTEX_NAME "gnutls-ocsp" 26 26 27 /* Default OCSP response cache timeout in seconds */27 /** Default OCSP response cache timeout in seconds */ 28 28 #define MGS_OCSP_CACHE_TIMEOUT 3600 29 /* Default OCSP failure timeout in seconds */29 /** Default OCSP failure timeout in seconds */ 30 30 #define MGS_OCSP_FAILURE_TIMEOUT 300 31 /* Default socket timeout for OCSP responder connections, in31 /** Default socket timeout for OCSP responder connections, in 32 32 * seconds. Note that the timeout applies to "absolutely no data sent 33 33 * or received", not the whole connection. 10 seconds in mod_ssl. */ … … 38 38 */ 39 39 struct mgs_ocsp_data { 40 /* OCSP URI extracted from the server certificate. NULL if40 /** OCSP URI extracted from the server certificate. NULL if 41 41 * unset. */ 42 42 apr_uri_t *uri; 43 /* Trust list to verify OCSP responses for stapling. Should43 /** Trust list to verify OCSP responses for stapling. Should 44 44 * usually only contain the CA that signed the server 45 45 * certificate. */ 46 46 gnutls_x509_trust_list_t *trust; 47 /* Server certificate fingerprint, used as cache key for the OCSP47 /** Server certificate fingerprint, used as cache key for the OCSP 48 48 * response */ 49 49 gnutls_datum_t fingerprint; … … 62 62 const char *arg); 63 63 64 /* 64 /** 65 65 * Create a trust list from a certificate chain (one or more 66 66 * certificates). 67 67 * 68 * tl:This trust list will be initialized and filled with the68 * @param tl This trust list will be initialized and filled with the 69 69 * specified certificate(s) 70 70 * 71 * chain: certificate chain, must contain at least num certifictes 71 * @param chain certificate chain, must contain at least `num` 72 * certifictes 72 73 * 73 * num:number of certificates to load from chain74 * @param num number of certificates to load from chain 74 75 * 75 76 * Chain is supposed to be static (the trust chain of the server 76 * certificate), so when gnutls_x509_trust_list_deinit()is called on77 * certificate), so when `gnutls_x509_trust_list_deinit()` is called on 77 78 * tl later, the "all" parameter should be zero. 78 79 * 79 * Returns GNUTLS_E_SUCCESSor a GnuTLS error code. In case of error80 * @return `GNUTLS_E_SUCCESS` or a GnuTLS error code. In case of error 80 81 * tl will be uninitialized. 81 82 */ -
src/gnutls_util.c
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2016 Thomas Klute 3 3 * -
src/gnutls_util.h
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2016 Thomas Klute 3 3 * … … 25 25 #define __MOD_GNUTLS_UTIL_H__ 26 26 27 /* maximum allowed length of one header line */27 /** maximum allowed length of one header line */ 28 28 #define HTTP_HDR_LINE_MAX 1024 29 29 -
src/mod_gnutls.c
r14548b9 r104e881 1 /* *1 /* 2 2 * Copyright 2004-2005 Paul Querna 3 3 * Copyright 2008, 2014 Nikos Mavrogiannopoulos … … 16 16 * See the License for the specific language governing permissions and 17 17 * limitations under the License. 18 *19 18 */ 20 19 … … 73 72 74 73 75 /* 76 * mod_rewrite calls this function to fill %{HTTPS}. A non-zero return 77 * value means that HTTPS is in use. 74 /** 75 * mod_rewrite calls this function to fill %{HTTPS}. 76 * 77 * @param c the connection to check 78 * @return non-zero value if HTTPS is in use, zero if not 78 79 */ 79 80 int ssl_is_https(conn_rec *c)
Note: See TracChangeset
for help on using the changeset viewer.