Changeset d8afa3e in mod_gnutls for include/mod_gnutls.h.in


Ignore:
Timestamp:
Dec 17, 2016, 6:56:34 PM (5 years ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, debian/stretch-backports, upstream
Children:
c598e21, d2b32f1
Parents:
ce12806 (diff), 677754f (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

New upstream version 0.8.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/mod_gnutls.h.in

    rce12806 rd8afa3e  
    1 /**
     1/*
    22 *  Copyright 2004-2005 Paul Querna
    33 *  Copyright 2014 Nikos Mavrogiannopoulos
    4  *  Copyright 2015 Thomas Klute
     4 *  Copyright 2015-2016 Thomas Klute
    55 *
    66 *  Licensed under the Apache License, Version 2.0 (the "License");
     
    1515 *  See the License for the specific language governing permissions and
    1616 *  limitations under the License.
    17  *
    1817 */
    1918
     
    3332/* GnuTLS Library Headers */
    3433#include <gnutls/gnutls.h>
    35 #if GNUTLS_VERSION_MAJOR == 2
    36 #include <gnutls/extra.h>
    37 #endif
    3834#include <gnutls/abstract.h>
    3935#include <gnutls/openpgp.h>
     
    5955/* Module Debug Mode */
    6056#define MOD_GNUTLS_DEBUG @OOO_MAINTAIN@
    61 
    62 /*
    63  * Recent Versions of 2.1 renamed several hooks.
    64  * This allows us to compile on 2.0.xx
    65  */
    66 #if AP_SERVER_MINORVERSION_NUMBER >= 2 || (AP_SERVER_MINORVERSION_NUMBER == 1 && AP_SERVER_PATCHLEVEL_NUMBER >= 3)
    67         #define USING_2_1_RECENT 1
    68 #else
    69         #define USING_2_1_RECENT 0
    70 #endif
    7157
    7258/* mod_gnutls Cache Types */
     
    8571} mgs_cache_e;
    8672
     73/* Internal cache data, defined in gnutls_cache.h */
     74typedef struct mgs_cache* mgs_cache_t;
     75
    8776typedef enum {
    8877    mgs_cvm_unset,
     
    9584typedef struct {
    9685    int client_verify_mode;
    97     const char* lua_bytecode;
    98     apr_size_t lua_bytecode_len;
    9986} mgs_dirconf_rec;
     87
     88
     89/* Internal per-vhost config for OCSP, defined in gnutls_ocsp.h */
     90typedef struct mgs_ocsp_data* mgs_ocsp_data_t;
    10091
    10192
     
    146137    mgs_cache_e cache_type;
    147138    const char* cache_config;
     139    /* Internal cache data */
     140    mgs_cache_t cache;
    148141
    149142        /* GnuTLS uses Session Tickets */
     
    216209        /* Last Cache timestamp */
    217210    apr_time_t last_cache_check;
     211
     212    /* Enable OCSP stapling */
     213    unsigned char ocsp_staple;
     214    /* Check nonce in OCSP responses? */
     215    unsigned char ocsp_check_nonce;
     216    /* Read OCSP response for stapling from this file instead of
     217     * sending a request over HTTP */
     218    char *ocsp_response_file;
     219    /* Internal OCSP data for this server */
     220    mgs_ocsp_data_t ocsp;
     221    /* Mutex to prevent parallel OCSP requests */
     222    apr_global_mutex_t *ocsp_mutex;
     223    /* Cache timeout for OCSP responses. Note that the nextUpdate
     224     * field of the response takes precedence if shorter. */
     225    apr_interval_time_t ocsp_cache_time;
     226    /* If an OCSP request fails wait this long before trying again. */
     227    apr_interval_time_t ocsp_failure_timeout;
     228    /* Socket timeout for OCSP requests */
     229    apr_interval_time_t ocsp_socket_timeout;
    218230} mgs_srvconf_rec;
    219231
     
    347359
    348360/**
    349  * Init the Cache after Configuration is done
    350  */
    351 int mgs_cache_post_config(apr_pool_t *p, server_rec *s,
    352                                  mgs_srvconf_rec *sc);
    353 /**
    354  * Init the Cache inside each Process
    355  */
    356 int mgs_cache_child_init(apr_pool_t *p, server_rec *s,
    357                                 mgs_srvconf_rec *sc);
    358 /**
    359  * Setup the Session Caching
    360  */
    361 int mgs_cache_session_init(mgs_handle_t *ctxt);
    362 
    363 #define GNUTLS_SESSION_ID_STRING_LEN \
    364     ((GNUTLS_MAX_SESSION_ID + 1) * 2)
    365 
    366 /**
    367361 * Perform any reinitialization required in PKCS #11
    368362 */
    369363int mgs_pkcs11_reinit(server_rec * s);
    370364
    371 /**
    372  * Convert a SSL Session ID into a Null Terminated Hex Encoded String
    373  * @param id raw SSL Session ID
    374  * @param idlen Length of the raw Session ID
    375  * @param str Location to store the Hex Encoded String
    376  * @param strsize The Maximum Length that can be stored in str
    377  */
    378 char *mgs_session_id2sz(unsigned char *id, int idlen,
    379                                 char *str, int strsize);
    380 
    381 /**
    382  * Convert a time_t into a Null Terminated String
    383  * @param t time_t time
    384  * @param str Location to store the Hex Encoded String
    385  * @param strsize The Maximum Length that can be stored in str
    386  */
    387 char *mgs_time2sz(time_t t, char *str, int strsize);
    388365
    389366
     
    391368
    392369/* Loads all files set in the configuration */
    393 int mgs_load_files(apr_pool_t * p, server_rec * s);
     370int mgs_load_files(apr_pool_t *pconf, apr_pool_t *ptemp, server_rec *s)
     371    __attribute__((nonnull));
    394372
    395373const char *mgs_set_srp_tpasswd_conf_file(cmd_parms * parms, void *dummy,
     
    414392                          const char *type, const char* arg);
    415393
    416 const char *mgs_set_cache_timeout(cmd_parms * parms, void *dummy,
    417                                   const char *arg);
     394const char *mgs_set_timeout(cmd_parms *parms, void *dummy, const char *arg);
    418395
    419396const char *mgs_set_client_verify(cmd_parms * parms, void *dummy,
     
    470447                        apr_pool_t * plog, apr_pool_t * ptemp);
    471448
    472 int mgs_hook_post_config(apr_pool_t * p, apr_pool_t * plog,
    473                          apr_pool_t * ptemp,
    474                          server_rec * base_server);
     449int mgs_hook_post_config(apr_pool_t *pconf,
     450                         apr_pool_t *plog,
     451                         apr_pool_t *ptemp,
     452                         server_rec *base_server);
    475453
    476454void mgs_hook_child_init(apr_pool_t *p, server_rec *s);
Note: See TracChangeset for help on using the changeset viewer.