Changeset e105d3e in mod_gnutls


Ignore:
Timestamp:
Jan 23, 2017, 11:15:16 PM (15 months ago)
Author:
Daniel Kahn Gillmor <dkg@…>
Branches:
debian/master, upstream
Children:
b824a91, f5342b1
Parents:
c598e21 (diff), 0202d6b (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.2

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    rc598e21 re105d3e  
     1** Version 0.8.2 (2017-01-08)
     2- Test suite: Ensure CRLF line ends in HTTP headers
     3- Test suite, gen_ocsp_index.c: Handle serial as fixed order byte array
     4
    15** Version 0.8.1 (2016-12-20)
    26- Bugfix: Use APR_SIZE_T_FMT for portable apr_size_t formatting
  • configure.ac

    rc598e21 re105d3e  
    11dnl
    2 AC_INIT(mod_gnutls, 0.8.1)
     2AC_INIT(mod_gnutls, 0.8.2)
    33OOO_CONFIG_NICE(config.nice)
    44MOD_GNUTLS_VERSION=AC_PACKAGE_VERSION
  • test/gen_ocsp_index.c

    rc598e21 re105d3e  
    1919 * permissions and limitations under the License.
    2020 */
     21#include <stdint.h>
    2122#include <stdio.h>
    2223#include <stdlib.h>
     
    5152     * any */
    5253    char* revocation = "";
    53     /* serial number (hex) */
    54     char serial[128];
     54    /* serial number (hex), allocated when the length is known */
     55    char* serial = NULL;
    5556    /* certificate filename, or "unknown" */
    5657    char* fname = "unknown";
     
    6465    strftime(expires, sizeof(expires), "%y%m%d%H%M%SZ", &etmp);
    6566
    66     unsigned long long sno = 0;
    67     size_t serial_size = sizeof(sno);
    68     gnutls_x509_crt_get_serial(cert, &sno, &serial_size);
    69     snprintf(serial, sizeof(serial), "%llx", sno);
     67    /* determine size of the serial number (in bytes) */
     68    size_t serial_size = 0;
     69    gnutls_x509_crt_get_serial(cert, NULL, &serial_size);
     70    /* allocate memory for serial number and its string representation */
     71    uint8_t* sno = calloc(serial_size, sizeof(uint8_t));
     72    serial = calloc(serial_size * 2 + 1, sizeof(char));
     73    /* actually get the serial */
     74    gnutls_x509_crt_get_serial(cert, sno, &serial_size);
     75    /* print serial into the buffer byte for byte */
     76    for (int i = 0; i < serial_size; i++)
     77        snprintf(serial + (2 * i), 3, "%.2X", sno[i]);
     78    /* free binary serial */
     79    free(sno);
    7080
    7181    size_t dn_size = sizeof(dn);
     
    7484    fprintf(stdout, "%s\t%s\t%s\t%s\t%s\t%s\n",
    7585            flag, expires, revocation, serial, fname, dn);
     86
     87    /* free hex serial */
     88    free(serial);
    7689
    7790cleanup:
  • test/runtests

    rc598e21 re105d3e  
    208208# case to proceed instead of waiting for it to return. The sleep
    209209# process is stopped after gnutls-cli terminates.
    210 if (sed "s/__HOSTNAME__/${TEST_HOST}/" <${t}/input && \
     210#
     211# The line end manipulation in sed guarantees that all header lines
     212# end with CRLF as required by RFC 7230, Section 3.1.1 regardless of
     213# the line ends in the input file.
     214if (sed -r "s/__HOSTNAME__/${TEST_HOST}/;s/\r?$/\r/" <${t}/input && \
    211215           run_with_pidfile "${sleep_pidfile}" sleep "${TEST_QUERY_DELAY}" &) | \
    212216       gnutls-cli -p "${TEST_PORT}" $(cat ${t}/gnutls-cli.args) "${TEST_HOST}" \
  • test/server.template.in

    rc598e21 re105d3e  
    1 serial=2
     1serial=587198681
    22cn=__HOSTNAME__
    33tls_www_server
  • test/test-27_OCSP_server.bash

    rc598e21 re105d3e  
    77# trigger OCSP server test in the runtests script
    88export CHECK_OCSP_SERVER="true"
     9echo "OCSP index for the test CA:"
     10cat authority/ocsp_index.txt
    911
    1012${srcdir}/runtests t-27
Note: See TracChangeset for help on using the changeset viewer.