Changeset 14548b9 in mod_gnutls for src/gnutls_cache.c


Ignore:
Timestamp:
Dec 5, 2016, 4:02:30 PM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, master, proxy-ticket, upstream
Children:
104e881
Parents:
d4d066f
git-author:
Thomas Klute <thomas2.klute@…> (12/05/16 16:01:23)
git-committer:
Thomas Klute <thomas2.klute@…> (12/05/16 16:02:30)
Message:

Update comments in gnutls_cache.(c|h) to work with Doxygen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_cache.c

    rd4d066f r14548b9  
    1 /**
     1/*
    22 *  Copyright 2004-2005 Paul Querna
    33 *  Copyright 2008 Nikos Mavrogiannopoulos
     
    1616 *  See the License for the specific language governing permissions and
    1717 *  limitations under the License.
    18  *
    1918 */
    2019
    21 /***
    22  * The signatures of the (dbm|mc)_cache_...() functions may be a bit
     20/**
     21 * @file gnutls_cache.c
     22 *
     23 * The signatures of the `(dbm|mc)_cache_...()` functions may be a bit
    2324 * confusing: "store" and "expire" take a server_rec, "fetch" an
    24  * mgs_handle_t, and "delete" the void* required for a
    25  * gnutls_db_remove_func. The first two have matching ..._session
     25 * mgs_handle_t, and "delete" the `void*` required for a
     26 * `gnutls_db_remove_func`. The first two have matching `..._session`
    2627 * functions to fit their respective GnuTLS session cache signatures.
    2728 *
    2829 * This is because "store", "expire" (dbm only), and "fetch" are also
    29  * needed for the OCSP cache. Their ..._session variants have been
     30 * needed for the OCSP cache. Their `..._session` variants have been
    3031 * created to take care of the session cache specific parts, mainly
    3132 * calculating the DB key from the session ID. They have to match the
    3233 * appropriate GnuTLS DB function signatures.
    3334 *
    34  * Additionally, there are the mc_cache_(store|fetch)_generic()
     35 * Additionally, there are the `mc_cache_(store|fetch)_generic()`
    3536 * functions. They exist because memcached requires string keys while
    3637 * DBM accepts binary keys, and provide wrappers to turn binary keys
    37  * into hex strings with a "mod_gnutls:" prefix.
     38 * into hex strings with a `mod_gnutls:` prefix.
    3839 *
    3940 * To update cached OCSP responses independent of client connections,
     
    4142 * the other hand "fetch" does not need to do that, because cached
    4243 * OCSP responses will be retrieved for use in client connections.
    43  ***/
     44 */
    4445
    4546#include "gnutls_cache.h"
     
    6465#endif
    6566
    66 /* default cache timeout */
     67/** Default session cache timeout */
    6768#define MGS_DEFAULT_CACHE_TIMEOUT 300
    6869
    69 /* it seems the default has some strange errors. Use SDBM
    70  */
     70/** Prefix for keys used with a memcached cache */
    7171#define MC_TAG "mod_gnutls:"
    72 /* two characters per byte, plus one more for '\0' */
     72/** Maximum length of the hex string representation of a GnuTLS
     73 * session ID: two characters per byte, plus one more for `\0` */
    7374#if GNUTLS_VERSION_NUMBER >= 0x030400
    7475#define GNUTLS_SESSION_ID_STRING_LEN ((GNUTLS_MAX_SESSION_ID_SIZE * 2) + 1)
     
    8586#endif
    8687
    87 /* Name the Session ID as:
    88  * server:port.SessionID
    89  * to disallow resuming sessions on different servers
     88/**
     89 * Turn a GnuTLS session ID into the key format we use with DBM
     90 * caches. Name the Session ID as `server:port.SessionID` to disallow
     91 * resuming sessions on different servers.
     92 *
     93 * @return `0` on success, `-1` on failure
    9094 */
    9195static int mgs_session_id2dbm(conn_rec *c, unsigned char *id, int idlen,
     
    106110}
    107111
    108 /* The OPENSSL_TIME_FORMAT macro and mgs_time2sz() serve to print time
    109  * in a format compatible with OpenSSL's ASN1_TIME_print()
     112/** The OPENSSL_TIME_FORMAT macro and mgs_time2sz() serve to print
     113 * time in a format compatible with OpenSSL's `ASN1_TIME_print()`
    110114 * function. */
    111 
    112115#define OPENSSL_TIME_FORMAT "%b %d %k:%M:%S %Y %Z"
    113116
     
    128131#if HAVE_APR_MEMCACHE
    129132
    130 /* Name the Session ID as:
    131  * server:port.SessionID
    132  * to disallow resuming sessions on different servers
     133/**
     134 * Turn a GnuTLS session ID into the key format we use with memcached
     135 * caches. Name the Session ID as `server:port.SessionID` to disallow
     136 * resuming sessions on different servers.
     137 *
     138 * @return `0` on success, `-1` on failure
    133139 */
    134140static char *mgs_session_id2mc(conn_rec * c, unsigned char *id, int idlen)
Note: See TracChangeset for help on using the changeset viewer.