Changeset f450ac9 in mod_gnutls for src/gnutls_cache.h


Ignore:
Timestamp:
Jun 9, 2016, 2:50:43 PM (4 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, master, proxy-ticket, upstream
Children:
70a1e5a
Parents:
d18afb8
git-author:
Thomas Klute <thomas2.klute@…> (06/09/16 14:36:10)
git-committer:
Thomas Klute <thomas2.klute@…> (06/09/16 14:50:43)
Message:

Replace mgs_session_id2sz() with apr_(p?)escape_hex()

There's no need to carry a local bin-to-hex function if APR already
provides a converter. Using integrated pool allocation even avoids a
few string copies in gnutls_hooks.c.

The session hex buffers in gnutls_cache.c don't need room for the
memcache tag because it is added in a apr_psprintf() call if
necessary, so we can save a few bytes of stack space there.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_cache.h

    rd18afb8 rf450ac9  
    4141int mgs_cache_session_init(mgs_handle_t *ctxt);
    4242
    43 #define GNUTLS_SESSION_ID_STRING_LEN \
    44     ((GNUTLS_MAX_SESSION_ID + 1) * 2)
    4543
    46 
    47 
    48 /**
    49  * Convert a SSL Session ID into a Null Terminated Hex Encoded String
    50  * @param id raw SSL Session ID
    51  * @param idlen Length of the raw Session ID
    52  * @param str Location to store the Hex Encoded String
    53  * @param strsize The Maximum Length that can be stored in str
    54  */
    55 char *mgs_session_id2sz(unsigned char *id, int idlen, char *str, int strsize);
    5644
    5745/**
Note: See TracChangeset for help on using the changeset viewer.