LCOV - code coverage report
Current view: top level - builds/gnutls/coverage/gnutls-git/lib/tls13 - session_ticket.h (source / functions) Hit Total Coverage
Test: GnuTLS-3.6.7 Code Coverage Lines: 8 8 100.0 %
Date: 2019-04-24 03:13:53 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 5 10 50.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (C) 2017 Red Hat, Inc.
       3                 :            :  *
       4                 :            :  * Author: Nikos Mavrogiannopoulos, Ander Juaristi
       5                 :            :  *
       6                 :            :  * This file is part of GnuTLS.
       7                 :            :  *
       8                 :            :  * The GnuTLS is free software; you can redistribute it and/or
       9                 :            :  * modify it under the terms of the GNU Lesser General Public License
      10                 :            :  * as published by the Free Software Foundation; either version 2.1 of
      11                 :            :  * the License, or (at your option) any later version.
      12                 :            :  *
      13                 :            :  * This library is distributed in the hope that it will be useful, but
      14                 :            :  * WITHOUT ANY WARRANTY; without even the implied warranty of
      15                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      16                 :            :  * Lesser General Public License for more details.
      17                 :            :  *
      18                 :            :  * You should have received a copy of the GNU Lesser General Public License
      19                 :            :  * along with this program.  If not, see <https://www.gnu.org/licenses/>
      20                 :            :  *
      21                 :            :  */
      22                 :            : #ifndef SESSION_TICKET_H
      23                 :            : #define SESSION_TICKET_H
      24                 :            : 
      25                 :            : int _gnutls13_recv_session_ticket(gnutls_session_t session, gnutls_buffer_st *buf);
      26                 :            : int _gnutls13_send_session_ticket(gnutls_session_t session, unsigned nr, unsigned again);
      27                 :            : 
      28                 :            : int _gnutls13_unpack_session_ticket(gnutls_session_t session,
      29                 :            :                                     gnutls_datum_t *data,
      30                 :            :                                     tls13_ticket_st *ticket_data);
      31                 :            : 
      32                 :            : inline static
      33                 :        309 : void tls13_ticket_deinit(tls13_ticket_st *ticket)
      34                 :            : {
      35         [ +  - ]:        309 :         if (ticket) {
      36                 :        309 :                 zeroize_temp_key(&ticket->resumption_master_secret,
      37                 :            :                                  sizeof(ticket->resumption_master_secret));
      38                 :            : 
      39         [ +  - ]:        309 :                 _gnutls_free_datum(&ticket->ticket);
      40                 :        309 :                 memset(ticket, 0, sizeof(tls13_ticket_st));
      41                 :            :         }
      42                 :        309 : }
      43                 :            : 
      44                 :            : inline static
      45                 :            : void _gnutls13_session_ticket_unset(gnutls_session_t session)
      46                 :            : {
      47         [ +  + ]:      33369 :         if (session->internals.tls13_ticket.ticket.data != NULL)
           [ +  -  #  # ]
      48                 :        138 :                 tls13_ticket_deinit(&session->internals.tls13_ticket);
      49                 :            : }
      50                 :            : 
      51                 :            : #endif

Generated by: LCOV version 1.13