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

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (C) 2017 Free Software Foundation, Inc.
       3                 :            :  *
       4                 :            :  * Author: 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                 :            : 
      23                 :            : struct psk_ext_parser_st {
      24                 :            :         const unsigned char *identities_data;
      25                 :            :         ssize_t identities_len;
      26                 :            : 
      27                 :            :         const unsigned char *binders_data;
      28                 :            :         ssize_t binders_len;
      29                 :            : };
      30                 :            : 
      31                 :            : typedef struct psk_ext_parser_st psk_ext_parser_st;
      32                 :            : typedef struct psk_ext_parser_st psk_ext_iter_st;
      33                 :            : 
      34                 :            : struct psk_st {
      35                 :            :         /* constant values */
      36                 :            :         gnutls_datum_t identity;
      37                 :            :         uint32_t ob_ticket_age;
      38                 :            : };
      39                 :            : 
      40                 :            : int _gnutls13_psk_ext_parser_init(psk_ext_parser_st *p,
      41                 :            :                                   const unsigned char *data, size_t len);
      42                 :            : 
      43                 :            : inline static
      44                 :            : void _gnutls13_psk_ext_iter_init(psk_ext_iter_st *iter,
      45                 :            :                                  const psk_ext_parser_st *p)
      46                 :            : {
      47                 :        872 :         memcpy(iter, p, sizeof(*p));
      48                 :            : }
      49                 :            : 
      50                 :            : int _gnutls13_psk_ext_iter_next_identity(psk_ext_iter_st *iter,
      51                 :            :                                          struct psk_st *psk);
      52                 :            : int _gnutls13_psk_ext_iter_next_binder(psk_ext_iter_st *iter,
      53                 :            :                                        gnutls_datum_t *binder);

Generated by: LCOV version 1.13