Changeset 0831437 in mod_gnutls for src/gnutls_cache.c


Ignore:
Timestamp:
Jun 11, 2016, 7:03:01 PM (3 years ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
debian/master, debian/stretch-backports, master, upstream
Children:
04addef
Parents:
47a909e
git-author:
Thomas Klute <thomas2.klute@…> (06/11/16 18:36:47)
git-committer:
Thomas Klute <thomas2.klute@…> (06/11/16 19:03:01)
Message:

Clarify the purpose of mgs_time2sz()

I've renamed the CTIME macro to OPENSSL_TIME_FORMAT because its name
is misleading: ctime() uses a different output format.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/gnutls_cache.c

    r47a909e r0831437  
    101101}
    102102
    103 #define CTIME "%b %d %k:%M:%S %Y %Z"
    104 
    105 char *mgs_time2sz(time_t in_time, char *str, int strsize) {
     103/* The OPENSSL_TIME_FORMAT macro and mgs_time2sz() serve to print time
     104 * in a format compatible with OpenSSL's ASN1_TIME_print()
     105 * function. */
     106
     107#define OPENSSL_TIME_FORMAT "%b %d %k:%M:%S %Y %Z"
     108
     109char *mgs_time2sz(time_t in_time, char *str, int strsize)
     110{
    106111    apr_time_exp_t vtm;
    107112    apr_size_t ret_size;
     
    111116    apr_time_ansi_put(&t, in_time);
    112117    apr_time_exp_gmt(&vtm, t);
    113     apr_strftime(str, &ret_size, strsize - 1, CTIME, &vtm);
     118    apr_strftime(str, &ret_size, strsize - 1, OPENSSL_TIME_FORMAT, &vtm);
    114119
    115120    return str;
Note: See TracChangeset for help on using the changeset viewer.