LCOV - code coverage report
Current view: top level - tls/extensions - s2n_client_sct_list.c (source / functions) Hit Total Coverage
Test: unit_test_coverage.info Lines: 7 7 100.0 %
Date: 2025-08-14 07:26:07 Functions: 2 2 100.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
       3                 :            :  *
       4                 :            :  * Licensed under the Apache License, Version 2.0 (the "License").
       5                 :            :  * You may not use this file except in compliance with the License.
       6                 :            :  * A copy of the License is located at
       7                 :            :  *
       8                 :            :  *  http://aws.amazon.com/apache2.0
       9                 :            :  *
      10                 :            :  * or in the "license" file accompanying this file. This file is distributed
      11                 :            :  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
      12                 :            :  * express or implied. See the License for the specific language governing
      13                 :            :  * permissions and limitations under the License.
      14                 :            :  */
      15                 :            : 
      16                 :            : #include "tls/extensions/s2n_client_sct_list.h"
      17                 :            : 
      18                 :            : #include <stdint.h>
      19                 :            : #include <sys/param.h>
      20                 :            : 
      21                 :            : #include "tls/s2n_tls.h"
      22                 :            : #include "tls/s2n_tls_parameters.h"
      23                 :            : #include "utils/s2n_safety.h"
      24                 :            : 
      25                 :            : static bool s2n_client_sct_list_should_send(struct s2n_connection *conn);
      26                 :            : static int s2n_client_sct_list_recv(struct s2n_connection *conn, struct s2n_stuffer *extension);
      27                 :            : 
      28                 :            : const s2n_extension_type s2n_client_sct_list_extension = {
      29                 :            :     .iana_value = TLS_EXTENSION_SCT_LIST,
      30                 :            :     .is_response = false,
      31                 :            :     .send = s2n_extension_send_noop,
      32                 :            :     .recv = s2n_client_sct_list_recv,
      33                 :            :     .should_send = s2n_client_sct_list_should_send,
      34                 :            :     .if_missing = s2n_extension_noop_if_missing,
      35                 :            : };
      36                 :            : 
      37                 :            : static bool s2n_client_sct_list_should_send(struct s2n_connection *conn)
      38                 :       7354 : {
      39                 :       7354 :     return conn->config->ct_type != S2N_CT_SUPPORT_NONE;
      40                 :       7354 : }
      41                 :            : 
      42                 :            : static int s2n_client_sct_list_recv(struct s2n_connection *conn, struct s2n_stuffer *out)
      43                 :          9 : {
      44                 :          9 :     conn->ct_level_requested = S2N_CT_SUPPORT_REQUEST;
      45                 :            :     /* Skip reading the extension, per RFC6962 (3.1.1) it SHOULD be empty anyway  */
      46                 :          9 :     return S2N_SUCCESS;
      47                 :          9 : }

Generated by: LCOV version 1.14