LCOV - code coverage report
Current view: top level - tls - s2n_security_policies.c (source / functions) Hit Total Coverage
Test: unit_test_coverage.info Lines: 365 443 82.4 %
Date: 2026-11-22 08:25:05 Functions: 25 25 100.0 %
Branches: 253 458 55.2 %

           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/s2n_security_policies.h"
      17                 :            : 
      18                 :            : #include "api/s2n.h"
      19                 :            : #include "crypto/s2n_pq.h"
      20                 :            : #include "tls/s2n_certificate_keys.h"
      21                 :            : #include "tls/s2n_connection.h"
      22                 :            : #include "tls/s2n_supported_group_preferences.h"
      23                 :            : #include "utils/s2n_safety.h"
      24                 :            : 
      25                 :            : /* Default as of 10/13 */
      26                 :            : const struct s2n_security_policy security_policy_20251014 = {
      27                 :            :     .minimum_protocol_version = S2N_TLS12,
      28                 :            :     .cipher_preferences = &cipher_preferences_20251014,
      29                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
      30                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
      31                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240501,
      32                 :            :     .rules = {
      33                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
      34                 :            :     },
      35                 :            : };
      36                 :            : 
      37                 :            : /* FIPS default as of 10/13 */
      38                 :            : const struct s2n_security_policy security_policy_20251015 = {
      39                 :            :     .minimum_protocol_version = S2N_TLS12,
      40                 :            :     .cipher_preferences = &cipher_preferences_20251015,
      41                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
      42                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
      43                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
      44                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
      45                 :            :     .rules = {
      46                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
      47                 :            :             [S2N_FIPS_140_3] = true,
      48                 :            :     },
      49                 :            : };
      50                 :            : 
      51                 :            : const struct s2n_security_policy security_policy_20240501 = {
      52                 :            :     .minimum_protocol_version = S2N_TLS12,
      53                 :            :     .cipher_preferences = &cipher_preferences_20240331,
      54                 :            :     .kem_preferences = &kem_preferences_null,
      55                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
      56                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240501,
      57                 :            :     .rules = {
      58                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
      59                 :            :     },
      60                 :            : };
      61                 :            : 
      62                 :            : const struct s2n_security_policy security_policy_20240502 = {
      63                 :            :     .minimum_protocol_version = S2N_TLS12,
      64                 :            :     .cipher_preferences = &cipher_preferences_20240331,
      65                 :            :     .kem_preferences = &kem_preferences_null,
      66                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
      67                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
      68                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
      69                 :            :     .rules = {
      70                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
      71                 :            :             [S2N_FIPS_140_3] = true,
      72                 :            :     },
      73                 :            : };
      74                 :            : 
      75                 :            : /* TLS1.3 default as of 05/24 */
      76                 :            : const struct s2n_security_policy security_policy_20240503 = {
      77                 :            :     .minimum_protocol_version = S2N_TLS12,
      78                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
      79                 :            :     .kem_preferences = &kem_preferences_null,
      80                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
      81                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
      82                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240501,
      83                 :            :     .rules = {
      84                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
      85                 :            :     },
      86                 :            : };
      87                 :            : 
      88                 :            : const struct s2n_security_policy security_policy_20241001 = {
      89                 :            :     .minimum_protocol_version = S2N_TLS12,
      90                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
      91                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
      92                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
      93                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
      94                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240501,
      95                 :            :     .rules = {
      96                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
      97                 :            :     },
      98                 :            : };
      99                 :            : 
     100                 :            : /* 20241001, but with ML-DSA added */
     101                 :            : const struct s2n_security_policy security_policy_20250512 = {
     102                 :            :     .minimum_protocol_version = S2N_TLS12,
     103                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
     104                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     105                 :            :     .signature_preferences = &s2n_signature_preferences_20250512,
     106                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250512,
     107                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240501,
     108                 :            :     .rules = {
     109                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     110                 :            :     },
     111                 :            : };
     112                 :            : 
     113                 :            : const struct s2n_security_policy security_policy_20250721 = {
     114                 :            :     .minimum_protocol_version = S2N_TLS12,
     115                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
     116                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     117                 :            :     .signature_preferences = &s2n_signature_preferences_20250512,
     118                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250512,
     119                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240501,
     120                 :            :     .rules = {
     121                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     122                 :            :     },
     123                 :            : };
     124                 :            : 
     125                 :            : const struct s2n_security_policy security_policy_20241001_pq_mixed = {
     126                 :            :     .minimum_protocol_version = S2N_TLS12,
     127                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
     128                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     129                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
     130                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
     131                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240501,
     132                 :            :     .rules = {
     133                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     134                 :            :     },
     135                 :            : };
     136                 :            : 
     137                 :            : const struct s2n_security_policy security_policy_20240603 = {
     138                 :            :     .minimum_protocol_version = S2N_TLS12,
     139                 :            :     .cipher_preferences = &cipher_preferences_20240603,
     140                 :            :     .kem_preferences = &kem_preferences_null,
     141                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
     142                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
     143                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240603,
     144                 :            : };
     145                 :            : 
     146                 :            : const struct s2n_security_policy security_policy_20170210 = {
     147                 :            :     .minimum_protocol_version = S2N_TLS10,
     148                 :            :     .cipher_preferences = &cipher_preferences_20170210,
     149                 :            :     .kem_preferences = &kem_preferences_null,
     150                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     151                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     152                 :            : };
     153                 :            : 
     154                 :            : const struct s2n_security_policy security_policy_20240417 = {
     155                 :            :     .minimum_protocol_version = S2N_TLS10,
     156                 :            :     .cipher_preferences = &cipher_preferences_20210831,
     157                 :            :     .kem_preferences = &kem_preferences_null,
     158                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     159                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
     160                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     161                 :            : };
     162                 :            : 
     163                 :            : /*
     164                 :            :  * This security policy is derived from the following specification:
     165                 :            :  * https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-52r2.pdf
     166                 :            :  *
     167                 :            :  * Supports TLS1.2
     168                 :            :  */
     169                 :            : const struct s2n_security_policy security_policy_20240416 = {
     170                 :            :     .minimum_protocol_version = S2N_TLS12,
     171                 :            :     .cipher_preferences = &cipher_preferences_default_fips,
     172                 :            :     .kem_preferences = &kem_preferences_null,
     173                 :            :     .signature_preferences = &s2n_signature_preferences_default_fips,
     174                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_default_fips,
     175                 :            :     .ecc_preferences = &s2n_ecc_preferences_default_fips,
     176                 :            :     .rules = {
     177                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     178                 :            :             [S2N_FIPS_140_3] = true,
     179                 :            :     },
     180                 :            : };
     181                 :            : 
     182                 :            : const struct s2n_security_policy security_policy_20230317 = {
     183                 :            :     .minimum_protocol_version = S2N_TLS12,
     184                 :            :     .cipher_preferences = &cipher_preferences_20230317,
     185                 :            :     .kem_preferences = &kem_preferences_null,
     186                 :            :     .signature_preferences = &s2n_signature_preferences_20230317,
     187                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20230317,
     188                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
     189                 :            :     .rules = {
     190                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     191                 :            :             [S2N_FIPS_140_3] = true,
     192                 :            :     },
     193                 :            : };
     194                 :            : 
     195                 :            : const struct s2n_security_policy security_policy_20230317_pq = {
     196                 :            :     .minimum_protocol_version = S2N_TLS12,
     197                 :            :     .cipher_preferences = &cipher_preferences_20230317,
     198                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     199                 :            :     .signature_preferences = &s2n_signature_preferences_20230317,
     200                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20230317,
     201                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
     202                 :            :     .rules = {
     203                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     204                 :            :             [S2N_FIPS_140_3] = true,
     205                 :            :     },
     206                 :            : };
     207                 :            : 
     208                 :            : const struct s2n_security_policy security_policy_20240331 = {
     209                 :            :     .minimum_protocol_version = S2N_TLS12,
     210                 :            :     .cipher_preferences = &cipher_preferences_20240331,
     211                 :            :     .kem_preferences = &kem_preferences_null,
     212                 :            :     .signature_preferences = &s2n_signature_preferences_20230317,
     213                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20230317,
     214                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
     215                 :            :     .rules = {
     216                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     217                 :            :             [S2N_FIPS_140_3] = true,
     218                 :            :     },
     219                 :            : };
     220                 :            : 
     221                 :            : const struct s2n_security_policy security_policy_20190801 = {
     222                 :            :     .minimum_protocol_version = S2N_TLS10,
     223                 :            :     .cipher_preferences = &cipher_preferences_20190801,
     224                 :            :     .kem_preferences = &kem_preferences_null,
     225                 :            :     /* The discrepancy in the date exists because the signature preferences
     226                 :            :      * were named when cipher preferences and signature preferences were
     227                 :            :      * tracked separately, and we chose to keep the cipher preference
     228                 :            :      * name because customers use it.
     229                 :            :      */
     230                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     231                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     232                 :            : };
     233                 :            : 
     234                 :            : const struct s2n_security_policy security_policy_TLS12_20261021_1 = {
     235                 :            :     .minimum_protocol_version = S2N_TLS12,
     236                 :            :     .cipher_preferences = &cipher_preferences_20261021_1,
     237                 :            :     .kem_preferences = &kem_preferences_null,
     238                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     239                 :            :     .ecc_preferences = &s2n_ecc_preferences_20261021,
     240                 :            : };
     241                 :            : 
     242                 :            : const struct s2n_security_policy security_policy_TLS10_20261021_1 = {
     243                 :            :     .minimum_protocol_version = S2N_TLS10,
     244                 :            :     .cipher_preferences = &cipher_preferences_20261021_2,
     245                 :            :     .kem_preferences = &kem_preferences_null,
     246                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     247                 :            :     .ecc_preferences = &s2n_ecc_preferences_20261021,
     248                 :            : };
     249                 :            : 
     250                 :            : /* Same cipher list as TLS12_20261021_1, but with a TLS 1.0 floor. */
     251                 :            : const struct s2n_security_policy security_policy_TLS10_20261021_2 = {
     252                 :            :     .minimum_protocol_version = S2N_TLS10,
     253                 :            :     .cipher_preferences = &cipher_preferences_20261021_1,
     254                 :            :     .kem_preferences = &kem_preferences_null,
     255                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     256                 :            :     .ecc_preferences = &s2n_ecc_preferences_20261021,
     257                 :            : };
     258                 :            : 
     259                 :            : const struct s2n_security_policy security_policy_TLS10_20261021_3 = {
     260                 :            :     .minimum_protocol_version = S2N_TLS10,
     261                 :            :     .cipher_preferences = &cipher_preferences_20261021_3,
     262                 :            :     .kem_preferences = &kem_preferences_null,
     263                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     264                 :            :     .ecc_preferences = &s2n_ecc_preferences_20261021,
     265                 :            : };
     266                 :            : 
     267                 :            : const struct s2n_security_policy security_policy_TLS10_20261021_4 = {
     268                 :            :     .minimum_protocol_version = S2N_TLS10,
     269                 :            :     .cipher_preferences = &cipher_preferences_20261021_4,
     270                 :            :     .kem_preferences = &kem_preferences_null,
     271                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     272                 :            :     .ecc_preferences = &s2n_ecc_preferences_20261021,
     273                 :            : };
     274                 :            : 
     275                 :            : const struct s2n_security_policy security_policy_20190802 = {
     276                 :            :     .minimum_protocol_version = S2N_TLS10,
     277                 :            :     .cipher_preferences = &cipher_preferences_20190801,
     278                 :            :     .kem_preferences = &kem_preferences_null,
     279                 :            :     /* The discrepancy in the date exists because the signature preferences
     280                 :            :      * were named when cipher preferences and signature preferences were
     281                 :            :      * tracked separately, and we chose to keep the cipher preference
     282                 :            :      * name because customers use it.
     283                 :            :      */
     284                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     285                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     286                 :            : };
     287                 :            : 
     288                 :            : const struct s2n_security_policy security_policy_20170405 = {
     289                 :            :     .minimum_protocol_version = S2N_TLS10,
     290                 :            :     .cipher_preferences = &cipher_preferences_20170405,
     291                 :            :     .kem_preferences = &kem_preferences_null,
     292                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     293                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     294                 :            : };
     295                 :            : 
     296                 :            : const struct s2n_security_policy security_policy_20170405_gcm = {
     297                 :            :     .minimum_protocol_version = S2N_TLS10,
     298                 :            :     .cipher_preferences = &cipher_preferences_20170405_gcm,
     299                 :            :     .kem_preferences = &kem_preferences_null,
     300                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     301                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     302                 :            : };
     303                 :            : 
     304                 :            : const struct s2n_security_policy security_policy_elb_2015_04 = {
     305                 :            :     .minimum_protocol_version = S2N_TLS10,
     306                 :            :     .cipher_preferences = &elb_security_policy_2015_04,
     307                 :            :     .kem_preferences = &kem_preferences_null,
     308                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     309                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     310                 :            : };
     311                 :            : 
     312                 :            : const struct s2n_security_policy security_policy_elb_2016_08 = {
     313                 :            :     .minimum_protocol_version = S2N_TLS10,
     314                 :            :     .cipher_preferences = &elb_security_policy_2016_08,
     315                 :            :     .kem_preferences = &kem_preferences_null,
     316                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     317                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     318                 :            : };
     319                 :            : 
     320                 :            : const struct s2n_security_policy security_policy_elb_tls_1_1_2017_01 = {
     321                 :            :     .minimum_protocol_version = S2N_TLS11,
     322                 :            :     .cipher_preferences = &elb_security_policy_tls_1_1_2017_01,
     323                 :            :     .kem_preferences = &kem_preferences_null,
     324                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     325                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     326                 :            : };
     327                 :            : 
     328                 :            : const struct s2n_security_policy security_policy_elb_tls_1_2_2017_01 = {
     329                 :            :     .minimum_protocol_version = S2N_TLS12,
     330                 :            :     .cipher_preferences = &elb_security_policy_tls_1_2_2017_01,
     331                 :            :     .kem_preferences = &kem_preferences_null,
     332                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     333                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     334                 :            : };
     335                 :            : 
     336                 :            : const struct s2n_security_policy security_policy_elb_tls_1_2_ext_2018_06 = {
     337                 :            :     .minimum_protocol_version = S2N_TLS12,
     338                 :            :     .cipher_preferences = &elb_security_policy_tls_1_2_ext_2018_06,
     339                 :            :     .kem_preferences = &kem_preferences_null,
     340                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     341                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     342                 :            : };
     343                 :            : 
     344                 :            : const struct s2n_security_policy security_policy_elb_fs_2018_06 = {
     345                 :            :     .minimum_protocol_version = S2N_TLS10,
     346                 :            :     .cipher_preferences = &elb_security_policy_fs_2018_06,
     347                 :            :     .kem_preferences = &kem_preferences_null,
     348                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     349                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     350                 :            :     .rules = {
     351                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     352                 :            :     },
     353                 :            : };
     354                 :            : 
     355                 :            : const struct s2n_security_policy security_policy_elb_fs_1_2_2019_08 = {
     356                 :            :     .minimum_protocol_version = S2N_TLS12,
     357                 :            :     .cipher_preferences = &elb_security_policy_fs_1_2_2019_08,
     358                 :            :     .kem_preferences = &kem_preferences_null,
     359                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     360                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     361                 :            :     .rules = {
     362                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     363                 :            :     },
     364                 :            : };
     365                 :            : 
     366                 :            : const struct s2n_security_policy security_policy_elb_fs_1_1_2019_08 = {
     367                 :            :     .minimum_protocol_version = S2N_TLS11,
     368                 :            :     .cipher_preferences = &elb_security_policy_fs_1_1_2019_08,
     369                 :            :     .kem_preferences = &kem_preferences_null,
     370                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     371                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     372                 :            :     .rules = {
     373                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     374                 :            :     },
     375                 :            : };
     376                 :            : 
     377                 :            : const struct s2n_security_policy security_policy_elb_fs_1_2_Res_2019_08 = {
     378                 :            :     .minimum_protocol_version = S2N_TLS12,
     379                 :            :     .cipher_preferences = &elb_security_policy_fs_1_2_Res_2019_08,
     380                 :            :     .kem_preferences = &kem_preferences_null,
     381                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     382                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     383                 :            :     .rules = {
     384                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     385                 :            :     },
     386                 :            : };
     387                 :            : 
     388                 :            : /* CloudFront upstream */
     389                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream = {
     390                 :            :     .minimum_protocol_version = S2N_SSLv3,
     391                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream,
     392                 :            :     .kem_preferences = &kem_preferences_null,
     393                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     394                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     395                 :            : };
     396                 :            : 
     397                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_tls10 = {
     398                 :            :     .minimum_protocol_version = S2N_TLS10,
     399                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_tls10,
     400                 :            :     .kem_preferences = &kem_preferences_null,
     401                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     402                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     403                 :            : };
     404                 :            : 
     405                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_tls11 = {
     406                 :            :     .minimum_protocol_version = S2N_TLS11,
     407                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_tls11,
     408                 :            :     .kem_preferences = &kem_preferences_null,
     409                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     410                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     411                 :            : };
     412                 :            : 
     413                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_tls12 = {
     414                 :            :     .minimum_protocol_version = S2N_TLS12,
     415                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_tls12,
     416                 :            :     .kem_preferences = &kem_preferences_null,
     417                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     418                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     419                 :            : };
     420                 :            : 
     421                 :            : /* CloudFront upstream 2025 -- same as original upstream above, but with:
     422                 :            :  * 1. TLSv1.3 enabled and
     423                 :            :  * 2. signature preferences updated to 2020-10-21, expanding support for RSA
     424                 :            :  *    PSS while preserving support for legacy signature algorithms
     425                 :            :  */
     426                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08 = {
     427                 :            :     .minimum_protocol_version = S2N_SSLv3,
     428                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     429                 :            :     .kem_preferences = &kem_preferences_null,
     430                 :            :     .signature_preferences = &s2n_signature_preferences_20250820,
     431                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     432                 :            : };
     433                 :            : 
     434                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls10 = {
     435                 :            :     .minimum_protocol_version = S2N_TLS10,
     436                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     437                 :            :     .kem_preferences = &kem_preferences_null,
     438                 :            :     .signature_preferences = &s2n_signature_preferences_20250820,
     439                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     440                 :            : };
     441                 :            : 
     442                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls11 = {
     443                 :            :     .minimum_protocol_version = S2N_TLS11,
     444                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     445                 :            :     .kem_preferences = &kem_preferences_null,
     446                 :            :     .signature_preferences = &s2n_signature_preferences_20250820,
     447                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     448                 :            : };
     449                 :            : 
     450                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls12 = {
     451                 :            :     .minimum_protocol_version = S2N_TLS12,
     452                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     453                 :            :     .kem_preferences = &kem_preferences_null,
     454                 :            :     .signature_preferences = &s2n_signature_preferences_20250820,
     455                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     456                 :            : };
     457                 :            : 
     458                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls13 = {
     459                 :            :     .minimum_protocol_version = S2N_TLS13,
     460                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08_tls13,
     461                 :            :     .kem_preferences = &kem_preferences_null,
     462                 :            :     .signature_preferences = &s2n_signature_preferences_20250820,
     463                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     464                 :            : };
     465                 :            : 
     466                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_pq = {
     467                 :            :     .minimum_protocol_version = S2N_SSLv3,
     468                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     469                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     470                 :            :     .signature_preferences = &s2n_signature_preferences_20250821,
     471                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     472                 :            : };
     473                 :            : 
     474                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls10_pq = {
     475                 :            :     .minimum_protocol_version = S2N_TLS10,
     476                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     477                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     478                 :            :     .signature_preferences = &s2n_signature_preferences_20250821,
     479                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     480                 :            : };
     481                 :            : 
     482                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls11_pq = {
     483                 :            :     .minimum_protocol_version = S2N_TLS11,
     484                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     485                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     486                 :            :     .signature_preferences = &s2n_signature_preferences_20250821,
     487                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     488                 :            : };
     489                 :            : 
     490                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls12_pq = {
     491                 :            :     .minimum_protocol_version = S2N_TLS12,
     492                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08,
     493                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     494                 :            :     .signature_preferences = &s2n_signature_preferences_20250821,
     495                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     496                 :            : };
     497                 :            : 
     498                 :            : const struct s2n_security_policy security_policy_cloudfront_upstream_2025_08_08_tls13_pq = {
     499                 :            :     .minimum_protocol_version = S2N_TLS13,
     500                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08_tls13,
     501                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     502                 :            :     .signature_preferences = &s2n_signature_preferences_20250821,
     503                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     504                 :            : };
     505                 :            : 
     506                 :            : /* CloudFront viewer facing */
     507                 :            : const struct s2n_security_policy security_policy_cloudfront_ssl_v_3 = {
     508                 :            :     .minimum_protocol_version = S2N_SSLv3,
     509                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_ssl_v_3,
     510                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     511                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     512                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     513                 :            : };
     514                 :            : 
     515                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2014 = {
     516                 :            :     .minimum_protocol_version = S2N_TLS10,
     517                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2014,
     518                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     519                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     520                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     521                 :            : };
     522                 :            : 
     523                 :            : /* Same as security_policy_cloudfront_tls_1_0_2014, but with IETF standard KEM Groups  */
     524                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2014_pq_beta = {
     525                 :            :     .minimum_protocol_version = S2N_TLS10,
     526                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2014,
     527                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     528                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     529                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     530                 :            : };
     531                 :            : 
     532                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2014_sha256 = {
     533                 :            :     .minimum_protocol_version = S2N_TLS10,
     534                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2014_sha256,
     535                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     536                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     537                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     538                 :            : };
     539                 :            : 
     540                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2016 = {
     541                 :            :     .minimum_protocol_version = S2N_TLS10,
     542                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2016,
     543                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     544                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     545                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     546                 :            : };
     547                 :            : 
     548                 :            : /* Same as security_policy_cloudfront_tls_1_0_2016, but with TLS 1.2 as minimum */
     549                 :            : const struct s2n_security_policy security_policy_20241106 = {
     550                 :            :     .minimum_protocol_version = S2N_TLS12,
     551                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2016,
     552                 :            :     .kem_preferences = &kem_preferences_null,
     553                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     554                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     555                 :            : };
     556                 :            : 
     557                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_1_2016 = {
     558                 :            :     .minimum_protocol_version = S2N_TLS11,
     559                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_1_2016,
     560                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     561                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     562                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     563                 :            : };
     564                 :            : 
     565                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2017 = {
     566                 :            :     .minimum_protocol_version = S2N_TLS12,
     567                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2017,
     568                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     569                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     570                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     571                 :            : };
     572                 :            : 
     573                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2018_no_sha1 = {
     574                 :            :     .minimum_protocol_version = S2N_TLS12,
     575                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2018,
     576                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     577                 :            :     .signature_preferences = &s2n_signature_preferences_20200207_no_sha1,
     578                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     579                 :            : };
     580                 :            : 
     581                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2018_beta = {
     582                 :            :     .minimum_protocol_version = S2N_TLS12,
     583                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2018_beta,
     584                 :            :     .kem_preferences = &kem_preferences_null,
     585                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     586                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     587                 :            : };
     588                 :            : 
     589                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019_no_sha1 = {
     590                 :            :     .minimum_protocol_version = S2N_TLS12,
     591                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
     592                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     593                 :            :     .signature_preferences = &s2n_signature_preferences_20200207_no_sha1,
     594                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     595                 :            :     .rules = {
     596                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     597                 :            :     },
     598                 :            : };
     599                 :            : 
     600                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2021_no_sha1 = {
     601                 :            :     .minimum_protocol_version = S2N_TLS12,
     602                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2021,
     603                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     604                 :            :     .signature_preferences = &s2n_signature_preferences_20200207_no_sha1,
     605                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     606                 :            :     .rules = {
     607                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     608                 :            :     },
     609                 :            : };
     610                 :            : 
     611                 :            : /* Same as security_policy_cloudfront_tls_1_2_2021_no_sha1, but with IETF standard KEM Groups  */
     612                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2021_no_sha1_pq_beta = {
     613                 :            :     .minimum_protocol_version = S2N_TLS12,
     614                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2021,
     615                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     616                 :            :     .signature_preferences = &s2n_signature_preferences_20200207_no_sha1,
     617                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     618                 :            :     .rules = {
     619                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     620                 :            :     },
     621                 :            : };
     622                 :            : 
     623                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2021_chacha20_boosted = {
     624                 :            :     .minimum_protocol_version = S2N_TLS12,
     625                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2021_chacha20_boosted,
     626                 :            :     .kem_preferences = &kem_preferences_null,
     627                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     628                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     629                 :            :     .rules = {
     630                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     631                 :            :     },
     632                 :            : };
     633                 :            : 
     634                 :            : /* FIPS 140-3 compliant version of security_policy_cloudfront_tls_1_2_2021 */
     635                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2025 = {
     636                 :            :     .minimum_protocol_version = S2N_TLS12,
     637                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2025,
     638                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     639                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     640                 :            :     .ecc_preferences = &s2n_ecc_preferences_default_fips,
     641                 :            :     .rules = {
     642                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     643                 :            :             [S2N_FIPS_140_3] = true,
     644                 :            :     },
     645                 :            : };
     646                 :            : 
     647                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_3_2025 = {
     648                 :            :     .minimum_protocol_version = S2N_TLS13,
     649                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_3_2025,
     650                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
     651                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     652                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     653                 :            :     .rules = {
     654                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     655                 :            :     },
     656                 :            : };
     657                 :            : 
     658                 :            : /* CloudFront non-pq viewer facing policies */
     659                 :            : const struct s2n_security_policy security_policy_cloudfront_ssl_v_3_no_pq = {
     660                 :            :     .minimum_protocol_version = S2N_SSLv3,
     661                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_ssl_v_3,
     662                 :            :     .kem_preferences = &kem_preferences_null,
     663                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     664                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     665                 :            : };
     666                 :            : 
     667                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2014_no_pq = {
     668                 :            :     .minimum_protocol_version = S2N_TLS10,
     669                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2014,
     670                 :            :     .kem_preferences = &kem_preferences_null,
     671                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     672                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     673                 :            : };
     674                 :            : 
     675                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2014_sha256_no_pq = {
     676                 :            :     .minimum_protocol_version = S2N_TLS10,
     677                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2014_sha256,
     678                 :            :     .kem_preferences = &kem_preferences_null,
     679                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     680                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     681                 :            : };
     682                 :            : 
     683                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2016_no_pq = {
     684                 :            :     .minimum_protocol_version = S2N_TLS10,
     685                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2016,
     686                 :            :     .kem_preferences = &kem_preferences_null,
     687                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     688                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     689                 :            : };
     690                 :            : 
     691                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_1_2016_no_pq = {
     692                 :            :     .minimum_protocol_version = S2N_TLS11,
     693                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_1_2016,
     694                 :            :     .kem_preferences = &kem_preferences_null,
     695                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     696                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     697                 :            : };
     698                 :            : 
     699                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2017_no_pq = {
     700                 :            :     .minimum_protocol_version = S2N_TLS12,
     701                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2017,
     702                 :            :     .kem_preferences = &kem_preferences_null,
     703                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     704                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     705                 :            : };
     706                 :            : 
     707                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2018_no_sha1_no_pq = {
     708                 :            :     .minimum_protocol_version = S2N_TLS12,
     709                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2018,
     710                 :            :     .kem_preferences = &kem_preferences_null,
     711                 :            :     .signature_preferences = &s2n_signature_preferences_20200207_no_sha1,
     712                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     713                 :            : };
     714                 :            : 
     715                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019_no_sha1_no_pq = {
     716                 :            :     .minimum_protocol_version = S2N_TLS12,
     717                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
     718                 :            :     .kem_preferences = &kem_preferences_null,
     719                 :            :     .signature_preferences = &s2n_signature_preferences_20200207_no_sha1,
     720                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     721                 :            :     .rules = {
     722                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     723                 :            :     },
     724                 :            : };
     725                 :            : 
     726                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2021_no_sha1_no_pq = {
     727                 :            :     .minimum_protocol_version = S2N_TLS12,
     728                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2021,
     729                 :            :     .kem_preferences = &kem_preferences_null,
     730                 :            :     .signature_preferences = &s2n_signature_preferences_20200207_no_sha1,
     731                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     732                 :            :     .rules = {
     733                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     734                 :            :     },
     735                 :            : };
     736                 :            : 
     737                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2025_no_pq = {
     738                 :            :     .minimum_protocol_version = S2N_TLS12,
     739                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2025,
     740                 :            :     .kem_preferences = &kem_preferences_null,
     741                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     742                 :            :     .ecc_preferences = &s2n_ecc_preferences_default_fips,
     743                 :            :     .rules = {
     744                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     745                 :            :             [S2N_FIPS_140_3] = true,
     746                 :            :     },
     747                 :            : };
     748                 :            : 
     749                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_3_2025_no_pq = {
     750                 :            :     .minimum_protocol_version = S2N_TLS13,
     751                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_3_2025,
     752                 :            :     .kem_preferences = &kem_preferences_null,
     753                 :            :     .signature_preferences = &s2n_signature_preferences_20250813,
     754                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     755                 :            :     .rules = {
     756                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     757                 :            :     },
     758                 :            : };
     759                 :            : 
     760                 :            : /* CloudFront viewer facing legacy policies */
     761                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2018 = {
     762                 :            :     .minimum_protocol_version = S2N_TLS12,
     763                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2018,
     764                 :            :     .kem_preferences = &kem_preferences_null,
     765                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     766                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     767                 :            : };
     768                 :            : 
     769                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019 = {
     770                 :            :     .minimum_protocol_version = S2N_TLS12,
     771                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019,
     772                 :            :     .kem_preferences = &kem_preferences_null,
     773                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     774                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     775                 :            :     .rules = {
     776                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     777                 :            :     },
     778                 :            : };
     779                 :            : 
     780                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2021 = {
     781                 :            :     .minimum_protocol_version = S2N_TLS12,
     782                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2021,
     783                 :            :     .kem_preferences = &kem_preferences_null,
     784                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     785                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     786                 :            :     .rules = {
     787                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     788                 :            :     },
     789                 :            : };
     790                 :            : 
     791                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2021_pq = {
     792                 :            :     .minimum_protocol_version = S2N_TLS12,
     793                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2021,
     794                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
     795                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     796                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     797                 :            :     .rules = {
     798                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     799                 :            :     },
     800                 :            : };
     801                 :            : 
     802                 :            : const struct s2n_security_policy security_policy_cloudfront_ssl_v_3_legacy = {
     803                 :            :     .minimum_protocol_version = S2N_SSLv3,
     804                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_ssl_v_3_legacy,
     805                 :            :     .kem_preferences = &kem_preferences_null,
     806                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     807                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     808                 :            : };
     809                 :            : 
     810                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2014_legacy = {
     811                 :            :     .minimum_protocol_version = S2N_TLS10,
     812                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2014_legacy,
     813                 :            :     .kem_preferences = &kem_preferences_null,
     814                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     815                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     816                 :            : };
     817                 :            : 
     818                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_0_2016_legacy = {
     819                 :            :     .minimum_protocol_version = S2N_TLS10,
     820                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_0_2016_legacy,
     821                 :            :     .kem_preferences = &kem_preferences_null,
     822                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     823                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     824                 :            : };
     825                 :            : 
     826                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_1_2016_legacy = {
     827                 :            :     .minimum_protocol_version = S2N_TLS11,
     828                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_1_2016_legacy,
     829                 :            :     .kem_preferences = &kem_preferences_null,
     830                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     831                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     832                 :            : };
     833                 :            : 
     834                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2018_legacy = {
     835                 :            :     .minimum_protocol_version = S2N_TLS12,
     836                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2018_legacy,
     837                 :            :     .kem_preferences = &kem_preferences_null,
     838                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     839                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     840                 :            : };
     841                 :            : 
     842                 :            : const struct s2n_security_policy security_policy_cloudfront_tls_1_2_2019_legacy = {
     843                 :            :     .minimum_protocol_version = S2N_TLS12,
     844                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_tls_1_2_2019_legacy,
     845                 :            :     .kem_preferences = &kem_preferences_null,
     846                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     847                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     848                 :            :     .rules = {
     849                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     850                 :            :     },
     851                 :            : };
     852                 :            : 
     853                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_ssl_v3 = {
     854                 :            :     .minimum_protocol_version = S2N_SSLv3,
     855                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_ssl_v3,
     856                 :            :     .kem_preferences = &kem_preferences_null,
     857                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     858                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     859                 :            : };
     860                 :            : 
     861                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_10 = {
     862                 :            :     .minimum_protocol_version = S2N_TLS10,
     863                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     864                 :            :     .kem_preferences = &kem_preferences_null,
     865                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     866                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     867                 :            : };
     868                 :            : 
     869                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_11 = {
     870                 :            :     .minimum_protocol_version = S2N_TLS11,
     871                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     872                 :            :     .kem_preferences = &kem_preferences_null,
     873                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     874                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     875                 :            : };
     876                 :            : 
     877                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_12 = {
     878                 :            :     .minimum_protocol_version = S2N_TLS12,
     879                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     880                 :            :     .kem_preferences = &kem_preferences_null,
     881                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     882                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     883                 :            : };
     884                 :            : 
     885                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_13 = {
     886                 :            :     .minimum_protocol_version = S2N_TLS13,
     887                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_tls_13,
     888                 :            :     .kem_preferences = &kem_preferences_null,
     889                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     890                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     891                 :            :     .rules = {
     892                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     893                 :            :     },
     894                 :            : };
     895                 :            : 
     896                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_ssl_v3_06_23 = {
     897                 :            :     .minimum_protocol_version = S2N_SSLv3,
     898                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_ssl_v3,
     899                 :            :     .kem_preferences = &kem_preferences_null,
     900                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     901                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     902                 :            : };
     903                 :            : 
     904                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_10_06_23 = {
     905                 :            :     .minimum_protocol_version = S2N_TLS10,
     906                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     907                 :            :     .kem_preferences = &kem_preferences_null,
     908                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     909                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     910                 :            : };
     911                 :            : 
     912                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_11_06_23 = {
     913                 :            :     .minimum_protocol_version = S2N_TLS11,
     914                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     915                 :            :     .kem_preferences = &kem_preferences_null,
     916                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     917                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     918                 :            : };
     919                 :            : 
     920                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_12_06_23 = {
     921                 :            :     .minimum_protocol_version = S2N_TLS12,
     922                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     923                 :            :     .kem_preferences = &kem_preferences_null,
     924                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     925                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     926                 :            : };
     927                 :            : 
     928                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_30_06_25 = {
     929                 :            :     .minimum_protocol_version = S2N_TLS12,
     930                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_2025,
     931                 :            :     .kem_preferences = &kem_preferences_null,
     932                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
     933                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     934                 :            :     .rules = {
     935                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     936                 :            :             [S2N_FIPS_140_3] = true,
     937                 :            :     },
     938                 :            : };
     939                 :            : 
     940                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_13_06_23 = {
     941                 :            :     .minimum_protocol_version = S2N_TLS13,
     942                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_tls_13,
     943                 :            :     .kem_preferences = &kem_preferences_null,
     944                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     945                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     946                 :            :     .rules = {
     947                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     948                 :            :     },
     949                 :            : };
     950                 :            : 
     951                 :            : const struct s2n_security_policy security_policy_kms_tls_1_0_2018_10 = {
     952                 :            :     .minimum_protocol_version = S2N_TLS10,
     953                 :            :     .cipher_preferences = &cipher_preferences_kms_tls_1_0_2018_10,
     954                 :            :     .kem_preferences = &kem_preferences_null,
     955                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
     956                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
     957                 :            :     .rules = {
     958                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     959                 :            :     },
     960                 :            : };
     961                 :            : 
     962                 :            : const struct s2n_security_policy security_policy_kms_tls_1_0_2021_08 = {
     963                 :            :     .minimum_protocol_version = S2N_TLS10,
     964                 :            :     .cipher_preferences = &cipher_preferences_kms_tls_1_0_2021_08,
     965                 :            :     .kem_preferences = &kem_preferences_null,
     966                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     967                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     968                 :            :     .rules = {
     969                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     970                 :            :     },
     971                 :            : };
     972                 :            : 
     973                 :            : const struct s2n_security_policy security_policy_kms_tls_1_2_2023_06 = {
     974                 :            :     .minimum_protocol_version = S2N_TLS12,
     975                 :            :     .cipher_preferences = &cipher_preferences_kms_tls_1_0_2021_08,
     976                 :            :     .kem_preferences = &kem_preferences_null,
     977                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     978                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
     979                 :            :     .rules = {
     980                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
     981                 :            :     },
     982                 :            : };
     983                 :            : 
     984                 :            : /* Same as security_policy_aws_crt_sdk_tls_10_06_23 but with (IETF-standardized) ML-KEM Support */
     985                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_10_07_25_pq = {
     986                 :            :     .minimum_protocol_version = S2N_TLS10,
     987                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     988                 :            :     .kem_preferences = &kem_preferences_all,
     989                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     990                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
     991                 :            : };
     992                 :            : 
     993                 :            : /* Same as security_policy_aws_crt_sdk_tls_12_06_23 but with (IETF-standardized) ML-KEM Support */
     994                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_12_07_25_pq = {
     995                 :            :     .minimum_protocol_version = S2N_TLS12,
     996                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
     997                 :            :     .kem_preferences = &kem_preferences_all,
     998                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
     999                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
    1000                 :            : };
    1001                 :            : 
    1002                 :            : /* Same as security_policy_aws_crt_sdk_tls_13_06_23 but with (IETF-standardized) ML-KEM Support */
    1003                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_13_07_25_pq = {
    1004                 :            :     .minimum_protocol_version = S2N_TLS13,
    1005                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_tls_13,
    1006                 :            :     .kem_preferences = &kem_preferences_all,
    1007                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1008                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
    1009                 :            : };
    1010                 :            : 
    1011                 :            : /* Same as security_policy_aws_crt_sdk_tls_12_06_23 but with ML-KEM Support */
    1012                 :            : const struct s2n_security_policy security_policy_aws_crt_sdk_tls_12_06_23_pq = {
    1013                 :            :     .minimum_protocol_version = S2N_TLS12,
    1014                 :            :     .cipher_preferences = &cipher_preferences_aws_crt_sdk_default,
    1015                 :            :     .kem_preferences = &kem_preferences_all,
    1016                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1017                 :            :     .ecc_preferences = &s2n_ecc_preferences_20230623,
    1018                 :            : };
    1019                 :            : 
    1020                 :            : /* Same as security_policy_pq_tls_1_2_2023_10_07, but with ML-KEM support */
    1021                 :            : const struct s2n_security_policy security_policy_pq_tls_1_2_2024_10_07 = {
    1022                 :            :     .minimum_protocol_version = S2N_TLS12,
    1023                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext2_2021_06,
    1024                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1025                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1026                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
    1027                 :            : };
    1028                 :            : 
    1029                 :            : /* Same as security_policy_pq_tls_1_2_2023_10_08, but with 3DES  removed, and added ML-KEM support */
    1030                 :            : const struct s2n_security_policy security_policy_pq_tls_1_2_2024_10_08 = {
    1031                 :            :     .minimum_protocol_version = S2N_TLS12,
    1032                 :            :     .cipher_preferences = &cipher_preferences_20241008,
    1033                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1034                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1035                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
    1036                 :            : };
    1037                 :            : 
    1038                 :            : /* Same as security_policy_pq_tls_1_2_2023_10_10, but with 3DES removed, and added ML-KEM support */
    1039                 :            : const struct s2n_security_policy security_policy_pq_tls_1_2_2024_10_08_gcm = {
    1040                 :            :     .minimum_protocol_version = S2N_TLS12,
    1041                 :            :     .cipher_preferences = &cipher_preferences_20241008_gcm,
    1042                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1043                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1044                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
    1045                 :            : };
    1046                 :            : 
    1047                 :            : /* Same as security_policy_pq_tls_1_2_2023_10_09 but with 3DES removed, and added ML-KEM support */
    1048                 :            : const struct s2n_security_policy security_policy_pq_tls_1_2_2024_10_09 = {
    1049                 :            :     .minimum_protocol_version = S2N_TLS12,
    1050                 :            :     .cipher_preferences = &cipher_preferences_20241009,
    1051                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1052                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1053                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
    1054                 :            :     .rules = {
    1055                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1056                 :            :     },
    1057                 :            : };
    1058                 :            : const struct s2n_security_policy security_policy_kms_fips_tls_1_2_2018_10 = {
    1059                 :            :     .minimum_protocol_version = S2N_TLS12,
    1060                 :            :     .cipher_preferences = &cipher_preferences_kms_fips_tls_1_2_2018_10,
    1061                 :            :     .kem_preferences = &kem_preferences_null,
    1062                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1063                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1064                 :            :     .rules = {
    1065                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1066                 :            :     },
    1067                 :            : };
    1068                 :            : 
    1069                 :            : const struct s2n_security_policy security_policy_kms_fips_tls_1_2_2021_08 = {
    1070                 :            :     .minimum_protocol_version = S2N_TLS12,
    1071                 :            :     .cipher_preferences = &cipher_preferences_kms_fips_tls_1_2_2021_08,
    1072                 :            :     .kem_preferences = &kem_preferences_null,
    1073                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1074                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1075                 :            :     .rules = {
    1076                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1077                 :            :     },
    1078                 :            : };
    1079                 :            : 
    1080                 :            : /* Same as security_policy_pq_20231215, but with only ML-KEM Support */
    1081                 :            : const struct s2n_security_policy security_policy_kms_fips_tls_1_2_2024_10 = {
    1082                 :            :     .minimum_protocol_version = S2N_TLS12,
    1083                 :            :     .cipher_preferences = &cipher_preferences_kms_fips_tls_1_2_2021_08,
    1084                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1085                 :            :     .signature_preferences = &s2n_signature_preferences_20230317,
    1086                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1087                 :            :     .rules = {
    1088                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1089                 :            :             [S2N_FIPS_140_3] = true,
    1090                 :            :     },
    1091                 :            : };
    1092                 :            : 
    1093                 :            : const struct s2n_security_policy security_policy_20140601 = {
    1094                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1095                 :            :     .cipher_preferences = &cipher_preferences_20140601,
    1096                 :            :     .kem_preferences = &kem_preferences_null,
    1097                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1098                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1099                 :            : };
    1100                 :            : 
    1101                 :            : const struct s2n_security_policy security_policy_20141001 = {
    1102                 :            :     .minimum_protocol_version = S2N_TLS10,
    1103                 :            :     .cipher_preferences = &cipher_preferences_20141001,
    1104                 :            :     .kem_preferences = &kem_preferences_null,
    1105                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1106                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1107                 :            : };
    1108                 :            : 
    1109                 :            : const struct s2n_security_policy security_policy_20150202 = {
    1110                 :            :     .minimum_protocol_version = S2N_TLS10,
    1111                 :            :     .cipher_preferences = &cipher_preferences_20150202,
    1112                 :            :     .kem_preferences = &kem_preferences_null,
    1113                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1114                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1115                 :            : };
    1116                 :            : 
    1117                 :            : const struct s2n_security_policy security_policy_20150214 = {
    1118                 :            :     .minimum_protocol_version = S2N_TLS10,
    1119                 :            :     .cipher_preferences = &cipher_preferences_20150214,
    1120                 :            :     .kem_preferences = &kem_preferences_null,
    1121                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1122                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1123                 :            : };
    1124                 :            : 
    1125                 :            : const struct s2n_security_policy security_policy_20160411 = {
    1126                 :            :     .minimum_protocol_version = S2N_TLS10,
    1127                 :            :     .cipher_preferences = &cipher_preferences_20160411,
    1128                 :            :     .kem_preferences = &kem_preferences_null,
    1129                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1130                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1131                 :            : };
    1132                 :            : 
    1133                 :            : const struct s2n_security_policy security_policy_20150306 = {
    1134                 :            :     .minimum_protocol_version = S2N_TLS10,
    1135                 :            :     .cipher_preferences = &cipher_preferences_20150306,
    1136                 :            :     .kem_preferences = &kem_preferences_null,
    1137                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1138                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1139                 :            : };
    1140                 :            : 
    1141                 :            : const struct s2n_security_policy security_policy_20160804 = {
    1142                 :            :     .minimum_protocol_version = S2N_TLS10,
    1143                 :            :     .cipher_preferences = &cipher_preferences_20160804,
    1144                 :            :     .kem_preferences = &kem_preferences_null,
    1145                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1146                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1147                 :            : };
    1148                 :            : 
    1149                 :            : const struct s2n_security_policy security_policy_20160824 = {
    1150                 :            :     .minimum_protocol_version = S2N_TLS10,
    1151                 :            :     .cipher_preferences = &cipher_preferences_20160824,
    1152                 :            :     .kem_preferences = &kem_preferences_null,
    1153                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1154                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1155                 :            : };
    1156                 :            : 
    1157                 :            : const struct s2n_security_policy security_policy_20190122 = {
    1158                 :            :     .minimum_protocol_version = S2N_TLS10,
    1159                 :            :     .cipher_preferences = &cipher_preferences_20190122,
    1160                 :            :     .kem_preferences = &kem_preferences_null,
    1161                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1162                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1163                 :            : };
    1164                 :            : 
    1165                 :            : const struct s2n_security_policy security_policy_20190121 = {
    1166                 :            :     .minimum_protocol_version = S2N_TLS10,
    1167                 :            :     .cipher_preferences = &cipher_preferences_20190121,
    1168                 :            :     .kem_preferences = &kem_preferences_null,
    1169                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1170                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1171                 :            : };
    1172                 :            : 
    1173                 :            : const struct s2n_security_policy security_policy_20190120 = {
    1174                 :            :     .minimum_protocol_version = S2N_TLS10,
    1175                 :            :     .cipher_preferences = &cipher_preferences_20190120,
    1176                 :            :     .kem_preferences = &kem_preferences_null,
    1177                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1178                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1179                 :            : };
    1180                 :            : 
    1181                 :            : const struct s2n_security_policy security_policy_20190214 = {
    1182                 :            :     .minimum_protocol_version = S2N_TLS10,
    1183                 :            :     .cipher_preferences = &cipher_preferences_20190214,
    1184                 :            :     .kem_preferences = &kem_preferences_null,
    1185                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1186                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1187                 :            : };
    1188                 :            : 
    1189                 :            : const struct s2n_security_policy security_policy_20190214_gcm = {
    1190                 :            :     .minimum_protocol_version = S2N_TLS10,
    1191                 :            :     .cipher_preferences = &cipher_preferences_20190214_gcm,
    1192                 :            :     .kem_preferences = &kem_preferences_null,
    1193                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1194                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1195                 :            : };
    1196                 :            : 
    1197                 :            : const struct s2n_security_policy security_policy_20210825 = {
    1198                 :            :     .minimum_protocol_version = S2N_TLS10,
    1199                 :            :     .cipher_preferences = &cipher_preferences_20210825,
    1200                 :            :     .kem_preferences = &kem_preferences_null,
    1201                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1202                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
    1203                 :            : };
    1204                 :            : 
    1205                 :            : const struct s2n_security_policy security_policy_20210825_gcm = {
    1206                 :            :     .minimum_protocol_version = S2N_TLS10,
    1207                 :            :     .cipher_preferences = &cipher_preferences_20210825_gcm,
    1208                 :            :     .kem_preferences = &kem_preferences_null,
    1209                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1210                 :            :     .ecc_preferences = &s2n_ecc_preferences_20200310,
    1211                 :            : };
    1212                 :            : 
    1213                 :            : const struct s2n_security_policy security_policy_20170328 = {
    1214                 :            :     .minimum_protocol_version = S2N_TLS10,
    1215                 :            :     .cipher_preferences = &cipher_preferences_20170328,
    1216                 :            :     .kem_preferences = &kem_preferences_null,
    1217                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1218                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1219                 :            : };
    1220                 :            : 
    1221                 :            : const struct s2n_security_policy security_policy_20170328_gcm = {
    1222                 :            :     .minimum_protocol_version = S2N_TLS10,
    1223                 :            :     .cipher_preferences = &cipher_preferences_20170328_gcm,
    1224                 :            :     .kem_preferences = &kem_preferences_null,
    1225                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1226                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1227                 :            : };
    1228                 :            : 
    1229                 :            : const struct s2n_security_policy security_policy_20170718 = {
    1230                 :            :     .minimum_protocol_version = S2N_TLS10,
    1231                 :            :     .cipher_preferences = &cipher_preferences_20170718,
    1232                 :            :     .kem_preferences = &kem_preferences_null,
    1233                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1234                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1235                 :            : };
    1236                 :            : 
    1237                 :            : const struct s2n_security_policy security_policy_20170718_gcm = {
    1238                 :            :     .minimum_protocol_version = S2N_TLS10,
    1239                 :            :     .cipher_preferences = &cipher_preferences_20170718_gcm,
    1240                 :            :     .kem_preferences = &kem_preferences_null,
    1241                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1242                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1243                 :            : };
    1244                 :            : 
    1245                 :            : const struct s2n_security_policy security_policy_20201021 = {
    1246                 :            :     .minimum_protocol_version = S2N_TLS10,
    1247                 :            :     .cipher_preferences = &cipher_preferences_20190122,
    1248                 :            :     .kem_preferences = &kem_preferences_null,
    1249                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1250                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1251                 :            : };
    1252                 :            : 
    1253                 :            : const struct s2n_security_policy security_policy_20210816 = {
    1254                 :            :     .minimum_protocol_version = S2N_TLS12,
    1255                 :            :     .cipher_preferences = &cipher_preferences_20210816,
    1256                 :            :     .kem_preferences = &kem_preferences_null,
    1257                 :            :     .signature_preferences = &s2n_signature_preferences_20210816,
    1258                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1259                 :            :     .rules = {
    1260                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1261                 :            :             [S2N_FIPS_140_3] = true,
    1262                 :            :     },
    1263                 :            : };
    1264                 :            : 
    1265                 :            : const struct s2n_security_policy security_policy_20210816_gcm = {
    1266                 :            :     .minimum_protocol_version = S2N_TLS12,
    1267                 :            :     .cipher_preferences = &cipher_preferences_20210816_gcm,
    1268                 :            :     .kem_preferences = &kem_preferences_null,
    1269                 :            :     .signature_preferences = &s2n_signature_preferences_20210816,
    1270                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1271                 :            :     .rules = {
    1272                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1273                 :            :             [S2N_FIPS_140_3] = true,
    1274                 :            :     },
    1275                 :            : };
    1276                 :            : 
    1277                 :            : /*
    1278                 :            :  * This security policy is derived from the following specification:
    1279                 :            :  * https://datatracker.ietf.org/doc/html/rfc9151
    1280                 :            :  */
    1281                 :            : const struct s2n_security_policy security_policy_20250429 = {
    1282                 :            :     .minimum_protocol_version = S2N_TLS12,
    1283                 :            :     .cipher_preferences = &cipher_preferences_20250429,
    1284                 :            :     .kem_preferences = &kem_preferences_null,
    1285                 :            :     .signature_preferences = &s2n_signature_preferences_20250429,
    1286                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1287                 :            :     .certificate_key_preferences = &s2n_certificate_key_preferences_20250429,
    1288                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1289                 :            :     .certificate_preferences_apply_locally = true,
    1290                 :            : };
    1291                 :            : 
    1292                 :            : /*
    1293                 :            :  * This security policy is derived from the following specification:
    1294                 :            :  * https://datatracker.ietf.org/doc/html/rfc9151
    1295                 :            :  *
    1296                 :            :  * The following exceptions to this specification are made:
    1297                 :            :  * - RSA cipher suites are not supported to allow for perfect forward secrecy.
    1298                 :            :  * - DHE cipher suites are not supported to remove the possibility of improper Diffie-Hellman
    1299                 :            :  *   parameter configuration.
    1300                 :            :  */
    1301                 :            : const struct s2n_security_policy security_policy_20251013 = {
    1302                 :            :     .minimum_protocol_version = S2N_TLS12,
    1303                 :            :     .cipher_preferences = &cipher_preferences_20251013,
    1304                 :            :     .kem_preferences = &kem_preferences_null,
    1305                 :            :     .signature_preferences = &s2n_signature_preferences_20250429,
    1306                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1307                 :            :     .certificate_key_preferences = &s2n_certificate_key_preferences_20250429,
    1308                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1309                 :            :     .certificate_preferences_apply_locally = true,
    1310                 :            :     .rules = {
    1311                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1312                 :            :             [S2N_FIPS_140_3] = true,
    1313                 :            :     },
    1314                 :            : };
    1315                 :            : 
    1316                 :            : /*
    1317                 :            :  * This security policy is a mix of default_tls13 (20240503) and rfc9151, with
    1318                 :            :  * a primary requirement that AES-256 is the ciphersuite chosen. Other
    1319                 :            :  * requirements are generally picked to raise minimum thresholds (e.g.,
    1320                 :            :  * requiring TLS 1.3) where possible without losing compatibility with modern
    1321                 :            :  * default_tls13 clients or servers.
    1322                 :            :  */
    1323                 :            : const struct s2n_security_policy security_policy_20250211 = {
    1324                 :            :     .minimum_protocol_version = S2N_TLS13,
    1325                 :            :     .cipher_preferences = &cipher_preferences_20250211,
    1326                 :            :     .kem_preferences = &kem_preferences_null,
    1327                 :            :     .signature_preferences = &s2n_signature_preferences_20250429,
    1328                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
    1329                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1330                 :            :     .rules = {
    1331                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1332                 :            :     },
    1333                 :            : };
    1334                 :            : 
    1335                 :            : /*
    1336                 :            :  * This is essentially identical to 20250211, but fixes a bug which required
    1337                 :            :  * P-384 keys on certificates, which invalidated the compatibility promise for
    1338                 :            :  * that policy.
    1339                 :            :  */
    1340                 :            : const struct s2n_security_policy security_policy_20250414 = {
    1341                 :            :     .minimum_protocol_version = S2N_TLS13,
    1342                 :            :     .cipher_preferences = &cipher_preferences_20250211,
    1343                 :            :     .kem_preferences = &kem_preferences_null,
    1344                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
    1345                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20201110,
    1346                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1347                 :            :     .rules = {
    1348                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1349                 :            :             [S2N_FIPS_140_3] = true,
    1350                 :            :     },
    1351                 :            : };
    1352                 :            : 
    1353                 :            : const struct s2n_security_policy security_policy_20251113 = {
    1354                 :            :     .minimum_protocol_version = S2N_TLS12,
    1355                 :            :     .cipher_preferences = &cipher_preferences_20251113,
    1356                 :            :     .kem_preferences = &kem_preferences_null,
    1357                 :            :     .signature_preferences = &s2n_signature_preferences_20251113,
    1358                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20251113,
    1359                 :            :     .ecc_preferences = &s2n_ecc_preferences_20251113,
    1360                 :            :     .strongly_preferred_groups = &cnsa_1_strong_preference,
    1361                 :            : };
    1362                 :            : 
    1363                 :            : const struct s2n_security_policy security_policy_20251114 = {
    1364                 :            :     .minimum_protocol_version = S2N_TLS12,
    1365                 :            :     .cipher_preferences = &cipher_preferences_20251114,
    1366                 :            :     .kem_preferences = &kem_preferences_null,
    1367                 :            :     .signature_preferences = &s2n_signature_preferences_20251113,
    1368                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20251113,
    1369                 :            :     .ecc_preferences = &s2n_ecc_preferences_20251113,
    1370                 :            :     .strongly_preferred_groups = &cnsa_1_strong_preference,
    1371                 :            : };
    1372                 :            : 
    1373                 :            : const struct s2n_security_policy security_policy_20251115 = {
    1374                 :            :     .minimum_protocol_version = S2N_TLS12,
    1375                 :            :     .cipher_preferences = &cipher_preferences_20251115,
    1376                 :            :     .kem_preferences = &kem_preferences_null,
    1377                 :            :     .signature_preferences = &s2n_signature_preferences_20251113,
    1378                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20251113,
    1379                 :            :     .ecc_preferences = &s2n_ecc_preferences_20251113,
    1380                 :            :     .strongly_preferred_groups = &cnsa_1_strong_preference,
    1381                 :            : };
    1382                 :            : 
    1383                 :            : const struct s2n_security_policy security_policy_20251116 = {
    1384                 :            :     .minimum_protocol_version = S2N_TLS10,
    1385                 :            :     .cipher_preferences = &cipher_preferences_20251116,
    1386                 :            :     .kem_preferences = &kem_preferences_null,
    1387                 :            :     .signature_preferences = &s2n_signature_preferences_20251113,
    1388                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20251113,
    1389                 :            :     .ecc_preferences = &s2n_ecc_preferences_20251113,
    1390                 :            :     .strongly_preferred_groups = &cnsa_1_strong_preference,
    1391                 :            : };
    1392                 :            : 
    1393                 :            : const struct s2n_security_policy security_policy_20251117 = {
    1394                 :            :     .minimum_protocol_version = S2N_TLS12,
    1395                 :            :     .cipher_preferences = &cipher_preferences_20251117,
    1396                 :            :     .kem_preferences = &kem_preferences_null,
    1397                 :            :     .signature_preferences = &s2n_signature_preferences_20251113,
    1398                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20251113,
    1399                 :            :     .ecc_preferences = &s2n_ecc_preferences_20251113,
    1400                 :            :     .strongly_preferred_groups = &cnsa_1_strong_preference,
    1401                 :            : };
    1402                 :            : 
    1403                 :            : /* strict CNSA 2.0 policy */
    1404                 :            : const struct s2n_security_policy security_policy_20260219 = {
    1405                 :            :     .minimum_protocol_version = S2N_TLS13,
    1406                 :            :     .cipher_preferences = &cipher_preferences_20250211,
    1407                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_cnsa2_2026_02,
    1408                 :            :     .signature_preferences = &s2n_signature_preferences_20260219,
    1409                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20260219,
    1410                 :            :     .certificate_key_preferences = &s2n_certificate_key_preferences_20260219,
    1411                 :            :     .ecc_preferences = &s2n_ecc_preferences_null,
    1412                 :            :     .certificate_preferences_apply_locally = true,
    1413                 :            :     .rules = {
    1414                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1415                 :            :             [S2N_FIPS_140_3] = true,
    1416                 :            :     },
    1417                 :            : };
    1418                 :            : 
    1419                 :            : /* CNSA 1.0 - 2.0 interop policy */
    1420                 :            : const struct s2n_security_policy security_policy_20260220 = {
    1421                 :            :     .minimum_protocol_version = S2N_TLS12,
    1422                 :            :     .cipher_preferences = &cipher_preferences_20260220,
    1423                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_cnsa2_2026_02,
    1424                 :            :     .signature_preferences = &s2n_signature_preferences_20260220,
    1425                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20260220,
    1426                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1427                 :            :     .rules = {
    1428                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1429                 :            :             [S2N_FIPS_140_3] = true,
    1430                 :            :     },
    1431                 :            : };
    1432                 :            : 
    1433                 :            : /* TLS 1.3 only CNSA2 interop policy: remove TLS 1.2 ciphers from 20260220 */
    1434                 :            : const struct s2n_security_policy security_policy_20260720 = {
    1435                 :            :     .minimum_protocol_version = S2N_TLS13,
    1436                 :            :     .cipher_preferences = &cipher_preferences_20250211,
    1437                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_cnsa2_2026_02,
    1438                 :            :     .signature_preferences = &s2n_signature_preferences_20260220,
    1439                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20260220,
    1440                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1441                 :            :     .rules = {
    1442                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1443                 :            :             [S2N_FIPS_140_3] = true,
    1444                 :            :     },
    1445                 :            : };
    1446                 :            : 
    1447                 :            : /* CNSA2 interop: add MLKEM1024 and ML-DSA-87 to 20251115 */
    1448                 :            : const struct s2n_security_policy security_policy_20260722 = {
    1449                 :            :     .minimum_protocol_version = S2N_TLS12,
    1450                 :            :     .cipher_preferences = &cipher_preferences_20251115,
    1451                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_cnsa2_2026_02,
    1452                 :            :     .signature_preferences = &s2n_signature_preferences_20260722,
    1453                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20260722,
    1454                 :            :     .ecc_preferences = &s2n_ecc_preferences_20251113,
    1455                 :            :     .strongly_preferred_groups = &cnsa_1_strong_preference,
    1456                 :            : };
    1457                 :            : 
    1458                 :            : /* 20250414 with pure MLKEM1024 and ML-DSA-87 added, interoperable with CNSA 2.0 */
    1459                 :            : const struct s2n_security_policy security_policy_20260513 = {
    1460                 :            :     .minimum_protocol_version = S2N_TLS13,
    1461                 :            :     .cipher_preferences = &cipher_preferences_20250211,
    1462                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_cnsa2_2026_02,
    1463                 :            :     .signature_preferences = &s2n_signature_preferences_20260513,
    1464                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20260514,
    1465                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1466                 :            :     .rules = {
    1467                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1468                 :            :             [S2N_FIPS_140_3] = true,
    1469                 :            :     },
    1470                 :            : };
    1471                 :            : 
    1472                 :            : const struct s2n_security_policy security_policy_20260520 = {
    1473                 :            :     .minimum_protocol_version = S2N_TLS10,
    1474                 :            :     .cipher_preferences = &cipher_preferences_20260520,
    1475                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1476                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1477                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1478                 :            : };
    1479                 :            : 
    1480                 :            : const struct s2n_security_policy security_policy_20260520_gcm = {
    1481                 :            :     .minimum_protocol_version = S2N_TLS10,
    1482                 :            :     .cipher_preferences = &cipher_preferences_20260520_gcm,
    1483                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1484                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1485                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1486                 :            : };
    1487                 :            : 
    1488                 :            : const struct s2n_security_policy security_policy_20260521 = {
    1489                 :            :     .minimum_protocol_version = S2N_TLS12,
    1490                 :            :     .cipher_preferences = &cipher_preferences_20260521,
    1491                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1492                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1493                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1494                 :            : };
    1495                 :            : 
    1496                 :            : const struct s2n_security_policy security_policy_20260521_gcm = {
    1497                 :            :     .minimum_protocol_version = S2N_TLS12,
    1498                 :            :     .cipher_preferences = &cipher_preferences_20260521_gcm,
    1499                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1500                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1501                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1502                 :            : };
    1503                 :            : 
    1504                 :            : const struct s2n_security_policy security_policy_20260522 = {
    1505                 :            :     .minimum_protocol_version = S2N_TLS12,
    1506                 :            :     .cipher_preferences = &cipher_preferences_20260522,
    1507                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1508                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1509                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1510                 :            : };
    1511                 :            : 
    1512                 :            : const struct s2n_security_policy security_policy_20260522_gcm = {
    1513                 :            :     .minimum_protocol_version = S2N_TLS12,
    1514                 :            :     .cipher_preferences = &cipher_preferences_20260522_gcm,
    1515                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1516                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1517                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1518                 :            : };
    1519                 :            : 
    1520                 :            : const struct s2n_security_policy security_policy_20260523 = {
    1521                 :            :     .minimum_protocol_version = S2N_TLS12,
    1522                 :            :     .cipher_preferences = &cipher_preferences_20260523,
    1523                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1524                 :            :     .signature_preferences = &s2n_signature_preferences_20240521,
    1525                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1526                 :            : };
    1527                 :            : 
    1528                 :            : const struct s2n_security_policy security_policy_20260523_gcm = {
    1529                 :            :     .minimum_protocol_version = S2N_TLS12,
    1530                 :            :     .cipher_preferences = &cipher_preferences_20260523_gcm,
    1531                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2024_10,
    1532                 :            :     .signature_preferences = &s2n_signature_preferences_20240521,
    1533                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1534                 :            : };
    1535                 :            : 
    1536                 :            : const struct s2n_security_policy security_policy_test_all = {
    1537                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1538                 :            :     .cipher_preferences = &cipher_preferences_test_all,
    1539                 :            :     .kem_preferences = &kem_preferences_all,
    1540                 :            :     .signature_preferences = &s2n_signature_preferences_all,
    1541                 :            :     .ecc_preferences = &s2n_ecc_preferences_test_all,
    1542                 :            : };
    1543                 :            : 
    1544                 :            : const struct s2n_security_policy security_policy_test_all_tls12 = {
    1545                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1546                 :            :     .cipher_preferences = &cipher_preferences_test_all_tls12,
    1547                 :            :     .kem_preferences = &kem_preferences_null,
    1548                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1549                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1550                 :            : };
    1551                 :            : 
    1552                 :            : const struct s2n_security_policy security_policy_test_all_fips = {
    1553                 :            :     .minimum_protocol_version = S2N_TLS12,
    1554                 :            :     .cipher_preferences = &cipher_preferences_test_all_fips,
    1555                 :            :     .kem_preferences = &kem_preferences_all,
    1556                 :            :     .signature_preferences = &s2n_signature_preferences_test_all_fips,
    1557                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1558                 :            :     .rules = {
    1559                 :            :             [S2N_FIPS_140_3] = true,
    1560                 :            :     },
    1561                 :            : };
    1562                 :            : 
    1563                 :            : const struct s2n_security_policy security_policy_test_all_ecdsa = {
    1564                 :            :     .minimum_protocol_version = S2N_TLS10,
    1565                 :            :     .cipher_preferences = &cipher_preferences_test_all_ecdsa,
    1566                 :            :     .kem_preferences = &kem_preferences_null,
    1567                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1568                 :            :     .ecc_preferences = &s2n_ecc_preferences_test_all,
    1569                 :            :     .rules = {
    1570                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1571                 :            :     },
    1572                 :            : };
    1573                 :            : 
    1574                 :            : const struct s2n_security_policy security_policy_test_all_rsa_kex = {
    1575                 :            :     .minimum_protocol_version = S2N_TLS10,
    1576                 :            :     .cipher_preferences = &cipher_preferences_test_all_rsa_kex,
    1577                 :            :     .kem_preferences = &kem_preferences_null,
    1578                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1579                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1580                 :            : };
    1581                 :            : 
    1582                 :            : const struct s2n_security_policy security_policy_test_all_tls13 = {
    1583                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1584                 :            :     .cipher_preferences = &cipher_preferences_test_all_tls13,
    1585                 :            :     .kem_preferences = &kem_preferences_null,
    1586                 :            :     .signature_preferences = &s2n_signature_preferences_all,
    1587                 :            :     .ecc_preferences = &s2n_ecc_preferences_test_all,
    1588                 :            :     .rules = {
    1589                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1590                 :            :     },
    1591                 :            : };
    1592                 :            : 
    1593                 :            : const struct s2n_security_policy security_policy_test_pq_only = {
    1594                 :            :     .minimum_protocol_version = S2N_TLS13,
    1595                 :            :     .cipher_preferences = &cipher_preferences_cloudfront_upstream_2025_08_08_tls13,
    1596                 :            :     .kem_preferences = &kem_preferences_all,
    1597                 :            :     .signature_preferences = &s2n_signature_preferences_20240501,
    1598                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20240501,
    1599                 :            :     .ecc_preferences = &s2n_ecc_preferences_null,
    1600                 :            :     .rules = {
    1601                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1602                 :            :     },
    1603                 :            : };
    1604                 :            : 
    1605                 :            : const struct s2n_security_policy security_policy_20200207 = {
    1606                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1607                 :            :     .cipher_preferences = &cipher_preferences_test_all_tls13,
    1608                 :            :     .kem_preferences = &kem_preferences_null,
    1609                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1610                 :            :     .ecc_preferences = &s2n_ecc_preferences_test_all,
    1611                 :            :     .rules = {
    1612                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1613                 :            :     },
    1614                 :            : };
    1615                 :            : 
    1616                 :            : const struct s2n_security_policy security_policy_20200207_pq = {
    1617                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1618                 :            :     .cipher_preferences = &cipher_preferences_test_all_tls13,
    1619                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1620                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1621                 :            :     .ecc_preferences = &s2n_ecc_preferences_test_all,
    1622                 :            :     .rules = {
    1623                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1624                 :            :     },
    1625                 :            : };
    1626                 :            : 
    1627                 :            : const struct s2n_security_policy security_policy_test_ecdsa_priority = {
    1628                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1629                 :            :     .cipher_preferences = &cipher_preferences_test_ecdsa_priority,
    1630                 :            :     .kem_preferences = &kem_preferences_null,
    1631                 :            :     .signature_preferences = &s2n_signature_preferences_20201021,
    1632                 :            :     .ecc_preferences = &s2n_ecc_preferences_test_all,
    1633                 :            : };
    1634                 :            : 
    1635                 :            : const struct s2n_security_policy security_policy_null = {
    1636                 :            :     .minimum_protocol_version = S2N_TLS10,
    1637                 :            :     .cipher_preferences = &cipher_preferences_null,
    1638                 :            :     .kem_preferences = &kem_preferences_null,
    1639                 :            :     .signature_preferences = &s2n_signature_preferences_null,
    1640                 :            :     .ecc_preferences = &s2n_ecc_preferences_null,
    1641                 :            : };
    1642                 :            : 
    1643                 :            : const struct s2n_security_policy security_policy_elb_backend_2016_08 = {
    1644                 :            :     .minimum_protocol_version = S2N_TLS10,
    1645                 :            :     .cipher_preferences = &elb_security_policy_backend_2016_08,
    1646                 :            :     .kem_preferences = &kem_preferences_null,
    1647                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1648                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1649                 :            : };
    1650                 :            : 
    1651                 :            : const struct s2n_security_policy security_policy_elb_sslv3_2013_12 = {
    1652                 :            :     .minimum_protocol_version = S2N_SSLv3,
    1653                 :            :     .cipher_preferences = &elb_security_policy_sslv3_2013_12,
    1654                 :            :     .kem_preferences = &kem_preferences_null,
    1655                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1656                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1657                 :            : };
    1658                 :            : 
    1659                 :            : const struct s2n_security_policy security_policy_elb_tls_1_1_Res_2017_01 = {
    1660                 :            :     .minimum_protocol_version = S2N_TLS11,
    1661                 :            :     .cipher_preferences = &elb_security_policy_tls_1_1_Res_2017_01,
    1662                 :            :     .kem_preferences = &kem_preferences_null,
    1663                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1664                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1665                 :            : };
    1666                 :            : 
    1667                 :            : const struct s2n_security_policy security_policy_elb_fs_1_2_Res_2020_10 = {
    1668                 :            :     .minimum_protocol_version = S2N_TLS12,
    1669                 :            :     .cipher_preferences = &elb_security_policy_fs_1_2_Res_2020_10,
    1670                 :            :     .kem_preferences = &kem_preferences_null,
    1671                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1672                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1673                 :            :     .rules = {
    1674                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1675                 :            :     },
    1676                 :            : };
    1677                 :            : 
    1678                 :            : const struct s2n_security_policy security_policy_intb_2021_04 = {
    1679                 :            :     .minimum_protocol_version = S2N_TLS12,
    1680                 :            :     .cipher_preferences = &cipher_preferences_intb_2021_04,
    1681                 :            :     .kem_preferences = &kem_preferences_null,
    1682                 :            :     .signature_preferences = &s2n_signature_preferences_20210816,
    1683                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1684                 :            : };
    1685                 :            : 
    1686                 :            : const struct s2n_security_policy security_policy_intb_2021_04_gcm = {
    1687                 :            :     .minimum_protocol_version = S2N_TLS12,
    1688                 :            :     .cipher_preferences = &cipher_preferences_intb_2021_04_gcm,
    1689                 :            :     .kem_preferences = &kem_preferences_null,
    1690                 :            :     .signature_preferences = &s2n_signature_preferences_20210816,
    1691                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1692                 :            :     .rules = {
    1693                 :            :             [S2N_PERFECT_FORWARD_SECRECY] = true,
    1694                 :            :     },
    1695                 :            : };
    1696                 :            : 
    1697                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_0_FIPS_2023_04 = {
    1698                 :            :     .minimum_protocol_version = S2N_TLS10,
    1699                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_0_FIPS_2023_04,
    1700                 :            :     .kem_preferences = &kem_preferences_null,
    1701                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1702                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1703                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1704                 :            : };
    1705                 :            : 
    1706                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_1_FIPS_2023_04 = {
    1707                 :            :     .minimum_protocol_version = S2N_TLS11,
    1708                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_1_FIPS_2023_04,
    1709                 :            :     .kem_preferences = &kem_preferences_null,
    1710                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1711                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1712                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1713                 :            : };
    1714                 :            : 
    1715                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_FIPS_2023_04 = {
    1716                 :            :     .minimum_protocol_version = S2N_TLS12,
    1717                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_FIPS_2023_04,
    1718                 :            :     .kem_preferences = &kem_preferences_null,
    1719                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1720                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1721                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1722                 :            : };
    1723                 :            : 
    1724                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext0_FIPS_2023_04 = {
    1725                 :            :     .minimum_protocol_version = S2N_TLS12,
    1726                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext0_FIPS_2023_04,
    1727                 :            :     .kem_preferences = &kem_preferences_null,
    1728                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1729                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1730                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1731                 :            : };
    1732                 :            : 
    1733                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext1_FIPS_2023_04 = {
    1734                 :            :     .minimum_protocol_version = S2N_TLS12,
    1735                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext1_FIPS_2023_04,
    1736                 :            :     .kem_preferences = &kem_preferences_null,
    1737                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1738                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1739                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1740                 :            : };
    1741                 :            : 
    1742                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext2_FIPS_2023_04 = {
    1743                 :            :     .minimum_protocol_version = S2N_TLS12,
    1744                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext2_FIPS_2023_04,
    1745                 :            :     .kem_preferences = &kem_preferences_null,
    1746                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1747                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1748                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1749                 :            : };
    1750                 :            : 
    1751                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Res_FIPS_2023_04 = {
    1752                 :            :     .minimum_protocol_version = S2N_TLS12,
    1753                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Res_FIPS_2023_04,
    1754                 :            :     .kem_preferences = &kem_preferences_null,
    1755                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1756                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1757                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1758                 :            : };
    1759                 :            : 
    1760                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_3_FIPS_2023_04 = {
    1761                 :            :     .minimum_protocol_version = S2N_TLS13,
    1762                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_3_FIPS_2023_04,
    1763                 :            :     .kem_preferences = &kem_preferences_null,
    1764                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1765                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1766                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1767                 :            : };
    1768                 :            : 
    1769                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_0_PQ_2025_09 = {
    1770                 :            :     .minimum_protocol_version = S2N_TLS10,
    1771                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_0_2021_06,
    1772                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1773                 :            :     .signature_preferences = &s2n_signature_preferences_20250820,
    1774                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1775                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240603,
    1776                 :            : };
    1777                 :            : 
    1778                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_PQ_2025_09 = {
    1779                 :            :     .minimum_protocol_version = S2N_TLS12,
    1780                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_2021_06,
    1781                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1782                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1783                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1784                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240603,
    1785                 :            : };
    1786                 :            : 
    1787                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Res_PQ_2025_09 = {
    1788                 :            :     .minimum_protocol_version = S2N_TLS12,
    1789                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Res_2021_06,
    1790                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1791                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1792                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1793                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240603,
    1794                 :            : };
    1795                 :            : 
    1796                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext1_PQ_2025_09 = {
    1797                 :            :     .minimum_protocol_version = S2N_TLS12,
    1798                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext1_2021_06,
    1799                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1800                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1801                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1802                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240603,
    1803                 :            : };
    1804                 :            : 
    1805                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext2_PQ_2025_09 = {
    1806                 :            :     .minimum_protocol_version = S2N_TLS12,
    1807                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext2_PQ_2025_09,
    1808                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1809                 :            :     .signature_preferences = &s2n_signature_preferences_20250820,
    1810                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1811                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240603,
    1812                 :            : };
    1813                 :            : 
    1814                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_3_PQ_2025_09 = {
    1815                 :            :     .minimum_protocol_version = S2N_TLS13,
    1816                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_3_2021_06,
    1817                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1818                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1819                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1820                 :            :     .ecc_preferences = &s2n_ecc_preferences_20240603,
    1821                 :            : };
    1822                 :            : 
    1823                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_0_FIPS_PQ_2025_09 = {
    1824                 :            :     .minimum_protocol_version = S2N_TLS10,
    1825                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_0_FIPS_2023_04,
    1826                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1827                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1828                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1829                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1830                 :            : };
    1831                 :            : 
    1832                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_FIPS_PQ_2025_09 = {
    1833                 :            :     .minimum_protocol_version = S2N_TLS12,
    1834                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_FIPS_2023_04,
    1835                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1836                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1837                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1838                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1839                 :            : };
    1840                 :            : 
    1841                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext0_FIPS_PQ_2025_09 = {
    1842                 :            :     .minimum_protocol_version = S2N_TLS12,
    1843                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext0_FIPS_2023_04,
    1844                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1845                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1846                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1847                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1848                 :            : };
    1849                 :            : 
    1850                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext1_FIPS_PQ_2025_09 = {
    1851                 :            :     .minimum_protocol_version = S2N_TLS12,
    1852                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext1_FIPS_2023_04,
    1853                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1854                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1855                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1856                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1857                 :            : };
    1858                 :            : 
    1859                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext2_FIPS_PQ_2025_09 = {
    1860                 :            :     .minimum_protocol_version = S2N_TLS12,
    1861                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext2_FIPS_2023_04,
    1862                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1863                 :            :     .signature_preferences = &s2n_signature_preferences_20261013,
    1864                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013,
    1865                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1866                 :            : };
    1867                 :            : 
    1868                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Res_FIPS_PQ_2025_09 = {
    1869                 :            :     .minimum_protocol_version = S2N_TLS12,
    1870                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Res_FIPS_2023_04,
    1871                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1872                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1873                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1874                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1875                 :            : };
    1876                 :            : 
    1877                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_3_FIPS_PQ_2025_09 = {
    1878                 :            :     .minimum_protocol_version = S2N_TLS13,
    1879                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_3_FIPS_2023_04,
    1880                 :            :     .kem_preferences = &kem_preferences_pq_tls_1_3_ietf_2025_07,
    1881                 :            :     .signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1882                 :            :     .certificate_signature_preferences = &s2n_signature_preferences_20261013_no_sha224,
    1883                 :            :     .ecc_preferences = &s2n_ecc_preferences_20201021,
    1884                 :            : };
    1885                 :            : 
    1886                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_RFC9151_FIPS_2023_07 = {
    1887                 :            :     .minimum_protocol_version = S2N_TLS12,
    1888                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_RFC9151_FIPS_2023_07,
    1889                 :            :     .kem_preferences = &kem_preferences_null,
    1890                 :            :     .signature_preferences = &s2n_signature_preferences_20250429,
    1891                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1892                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1893                 :            : };
    1894                 :            : 
    1895                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_2_Ext0_RFC9151_FIPS_2023_07 = {
    1896                 :            :     .minimum_protocol_version = S2N_TLS12,
    1897                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_2_Ext0_RFC9151_FIPS_2023_07,
    1898                 :            :     .kem_preferences = &kem_preferences_null,
    1899                 :            :     .signature_preferences = &s2n_signature_preferences_20250429,
    1900                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1901                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1902                 :            : };
    1903                 :            : 
    1904                 :            : const struct s2n_security_policy security_policy_elb_tls13_1_3_RFC9151_FIPS_2023_07 = {
    1905                 :            :     .minimum_protocol_version = S2N_TLS13,
    1906                 :            :     .cipher_preferences = &elb_security_policy_tls13_1_3_RFC9151_FIPS_2023_07,
    1907                 :            :     .kem_preferences = &kem_preferences_null,
    1908                 :            :     .signature_preferences = &s2n_signature_preferences_20250429,
    1909                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1910                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1911                 :            : };
    1912                 :            : 
    1913                 :            : const struct s2n_security_policy security_policy_elb_tls12_1_2_RFC9151_2024_01 = {
    1914                 :            :     .minimum_protocol_version = S2N_TLS12,
    1915                 :            :     .cipher_preferences = &elb_security_policy_tls12_1_2_RFC9151_2024_01,
    1916                 :            :     .kem_preferences = &kem_preferences_null,
    1917                 :            :     /* Not s2n_signature_preferences_20250429, which also offers rsa_pss. This TLS1.2
    1918                 :            :      * policy offers only ecdsa_sha384 and rsa_pkcs1_sha384. */
    1919                 :            :     .signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1920                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1921                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1922                 :            : };
    1923                 :            : 
    1924                 :            : const struct s2n_security_policy security_policy_elb_tls12_1_2_Ext0_RFC9151_2024_01 = {
    1925                 :            :     .minimum_protocol_version = S2N_TLS12,
    1926                 :            :     .cipher_preferences = &elb_security_policy_tls12_1_2_Ext0_RFC9151_2024_01,
    1927                 :            :     .kem_preferences = &kem_preferences_null,
    1928                 :            :     /* Not s2n_signature_preferences_20250429, which also offers rsa_pss. This TLS1.2
    1929                 :            :      * policy offers only ecdsa_sha384 and rsa_pkcs1_sha384. */
    1930                 :            :     .signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1931                 :            :     .certificate_signature_preferences = &s2n_certificate_signature_preferences_20250429,
    1932                 :            :     .ecc_preferences = &s2n_ecc_preferences_20210816,
    1933                 :            : };
    1934                 :            : 
    1935                 :            : const struct s2n_security_policy security_policy_20170816_healthcheck = {
    1936                 :            :     .minimum_protocol_version = S2N_TLS10,
    1937                 :            :     .cipher_preferences = &cipher_preferences_20170816_healthcheck,
    1938                 :            :     .kem_preferences = &kem_preferences_null,
    1939                 :            :     .signature_preferences = &s2n_signature_preferences_20140601,
    1940                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1941                 :            : };
    1942                 :            : 
    1943                 :            : const struct s2n_security_policy security_policy_kms_tls_1_2_2023_07 = {
    1944                 :            :     .minimum_protocol_version = S2N_TLS12,
    1945                 :            :     .cipher_preferences = &cipher_preferences_kms_tls_1_2_2023_07,
    1946                 :            :     .kem_preferences = &kem_preferences_null,
    1947                 :            :     .signature_preferences = &s2n_signature_preferences_20200207,
    1948                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1949                 :            : };
    1950                 :            : 
    1951                 :            : const struct s2n_security_policy security_policy_kms_fips_tls_1_2_2023_09 = {
    1952                 :            :     .minimum_protocol_version = S2N_TLS12,
    1953                 :            :     .cipher_preferences = &cipher_preferences_kms_fips_tls_1_2_2021_08,
    1954                 :            :     .kem_preferences = &kem_preferences_null,
    1955                 :            :     .signature_preferences = &s2n_certificate_signature_preferences_20201110,
    1956                 :            :     .ecc_preferences = &s2n_ecc_preferences_20140601,
    1957                 :            : };
    1958                 :            : struct s2n_security_policy_selection security_policy_selection[] = {
    1959                 :            :     /* If changing named policies, please update the usage guide's docs on the corresponding policy.
    1960                 :            :      * You likely also want to update the compatibility unit tests in (tests/unit/s2n_security_rules_test.c).
    1961                 :            :      */
    1962                 :            :     { .version = "default", .security_policy = &security_policy_20251014, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1963                 :            :     { .version = "default_tls13", .security_policy = &security_policy_20240503, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1964                 :            :     { .version = "default_fips", .security_policy = &security_policy_20251015, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1965                 :            :     { .version = "default_pq", .security_policy = &security_policy_20250721, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1966                 :            :     { .version = "20241106", .security_policy = &security_policy_20241106, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1967                 :            :     { .version = "20240501", .security_policy = &security_policy_20240501, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1968                 :            :     { .version = "20240502", .security_policy = &security_policy_20240502, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1969                 :            :     { .version = "20240503", .security_policy = &security_policy_20240503, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1970                 :            :     { .version = "20230317", .security_policy = &security_policy_20230317, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1971                 :            :     { .version = "20230317_pq", .security_policy = &security_policy_20230317_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1972                 :            :     { .version = "20240331", .security_policy = &security_policy_20240331, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1973                 :            :     { .version = "20240417", .security_policy = &security_policy_20240417, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1974                 :            :     { .version = "20240416", .security_policy = &security_policy_20240416, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1975                 :            :     { .version = "20241001", .security_policy = &security_policy_20241001, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1976                 :            :     { .version = "20250512", .security_policy = &security_policy_20250512, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1977                 :            :     { .version = "20250721", .security_policy = &security_policy_20250721, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1978                 :            :     { .version = "20251014", .security_policy = &security_policy_20251014, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1979                 :            :     { .version = "20251015", .security_policy = &security_policy_20251015, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1980                 :            :     { .version = "20241001_pq_mixed", .security_policy = &security_policy_20241001_pq_mixed, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1981                 :            :     { .version = "TLS12_20261021_1", .security_policy = &security_policy_TLS12_20261021_1, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1982                 :            :     { .version = "TLS10_20261021_1", .security_policy = &security_policy_TLS10_20261021_1, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1983                 :            :     { .version = "TLS10_20261021_2", .security_policy = &security_policy_TLS10_20261021_2, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1984                 :            :     { .version = "TLS10_20261021_3", .security_policy = &security_policy_TLS10_20261021_3, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1985                 :            :     { .version = "TLS10_20261021_4", .security_policy = &security_policy_TLS10_20261021_4, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1986                 :            :     { .version = "ELBSecurityPolicy-TLS-1-0-2015-04", .security_policy = &security_policy_elb_2015_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1987                 :            :     /* Not a mistake. TLS-1-0-2015-05 and 2016-08 are equivalent */
    1988                 :            :     { .version = "ELBSecurityPolicy-TLS-1-0-2015-05", .security_policy = &security_policy_elb_2016_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1989                 :            :     { .version = "ELBSecurityPolicy-2016-08", .security_policy = &security_policy_elb_2016_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1990                 :            :     { .version = "ELBSecurityPolicy-TLS-1-1-2017-01", .security_policy = &security_policy_elb_tls_1_1_2017_01, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1991                 :            :     { .version = "ELBSecurityPolicy-TLS-1-2-2017-01", .security_policy = &security_policy_elb_tls_1_2_2017_01, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1992                 :            :     { .version = "ELBSecurityPolicy-TLS-1-2-Ext-2018-06", .security_policy = &security_policy_elb_tls_1_2_ext_2018_06, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1993                 :            :     { .version = "ELBSecurityPolicy-FS-2018-06", .security_policy = &security_policy_elb_fs_2018_06, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1994                 :            :     { .version = "ELBSecurityPolicy-FS-1-2-2019-08", .security_policy = &security_policy_elb_fs_1_2_2019_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1995                 :            :     { .version = "ELBSecurityPolicy-FS-1-1-2019-08", .security_policy = &security_policy_elb_fs_1_1_2019_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1996                 :            :     { .version = "ELBSecurityPolicy-FS-1-2-Res-2019-08", .security_policy = &security_policy_elb_fs_1_2_Res_2019_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1997                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-3-CNSA2-INTEROP1-FIPS-PQ-2026-07", .security_policy = &security_policy_20260720, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1998                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-CNSA2-INTEROP2-FIPS-PQ-2026-07", .security_policy = &security_policy_20260220, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    1999                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-CNSA2-INTEROP3-FIPS-PQ-2026-07", .security_policy = &security_policy_20260722, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2000                 :            :     { .version = "ELBSecurityPolicy-FS-1-2-Res-2020-10", .security_policy = &security_policy_elb_fs_1_2_Res_2020_10, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2001                 :            :     { .version = "ELBSecurityPolicy-Backend-2016-08", .security_policy = &security_policy_elb_backend_2016_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2002                 :            :     { .version = "ELBSecurityPolicy-SSLv3-2013-12", .security_policy = &security_policy_elb_sslv3_2013_12, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2003                 :            :     { .version = "ELBSecurityPolicy-TLS-1-1-Res-2017-01", .security_policy = &security_policy_elb_tls_1_1_Res_2017_01, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2004                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-0-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_0_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2005                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-1-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_1_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2006                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_2_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2007                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext0-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_2_Ext0_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2008                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext1-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_2_Ext1_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2009                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext2-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_2_Ext2_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2010                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Res-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_2_Res_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2011                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-3-FIPS-2023-04", .security_policy = &security_policy_elb_tls13_1_3_FIPS_2023_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2012                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-RFC9151-FIPS-2023-07", .security_policy = &security_policy_elb_tls13_1_2_RFC9151_FIPS_2023_07, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2013                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext0-RFC9151-FIPS-2023-07", .security_policy = &security_policy_elb_tls13_1_2_Ext0_RFC9151_FIPS_2023_07, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2014                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-3-RFC9151-FIPS-2023-07", .security_policy = &security_policy_elb_tls13_1_3_RFC9151_FIPS_2023_07, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2015                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-RFC9151-INTEROP1-FIPS-2023-07", .security_policy = &security_policy_20251113, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2016                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-RFC9151-INTEROP2-FIPS-2023-07", .security_policy = &security_policy_20251117, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2017                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-RFC9151-INTEROP3-FIPS-2023-07", .security_policy = &security_policy_20251114, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2018                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-RFC9151-INTEROP4-FIPS-2023-07", .security_policy = &security_policy_20251115, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2019                 :            :     { .version = "ELBSecurityPolicy-TLS12-1-2-RFC9151-2024-01", .security_policy = &security_policy_elb_tls12_1_2_RFC9151_2024_01, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2020                 :            :     { .version = "ELBSecurityPolicy-TLS12-1-2-Ext0-RFC9151-2024-01", .security_policy = &security_policy_elb_tls12_1_2_Ext0_RFC9151_2024_01, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2021                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-0-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_0_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2022                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2023                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Res-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_Res_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2024                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext1-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_Ext1_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2025                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext2-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_Ext2_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2026                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-3-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_3_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2027                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-0-FIPS-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_0_FIPS_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2028                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-FIPS-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_FIPS_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2029                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext0-FIPS-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_Ext0_FIPS_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2030                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext1-FIPS-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_Ext1_FIPS_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2031                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Ext2-FIPS-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_Ext2_FIPS_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2032                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-2-Res-FIPS-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_2_Res_FIPS_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2033                 :            :     { .version = "ELBSecurityPolicy-TLS13-1-3-FIPS-PQ-2025-09", .security_policy = &security_policy_elb_tls13_1_3_FIPS_PQ_2025_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2034                 :            :     { .version = "CloudFront-Upstream", .security_policy = &security_policy_cloudfront_upstream, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2035                 :            :     { .version = "CloudFront-Upstream-TLS-1-0", .security_policy = &security_policy_cloudfront_upstream_tls10, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2036                 :            :     { .version = "CloudFront-Upstream-TLS-1-1", .security_policy = &security_policy_cloudfront_upstream_tls11, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2037                 :            :     { .version = "CloudFront-Upstream-TLS-1-2", .security_policy = &security_policy_cloudfront_upstream_tls12, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2038                 :            :     { .version = "CloudFront-Upstream-2025", .security_policy = &security_policy_cloudfront_upstream_2025_08_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2039                 :            :     { .version = "CloudFront-Upstream-TLS-1-0-2025", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls10, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2040                 :            :     { .version = "CloudFront-Upstream-TLS-1-1-2025", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls11, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2041                 :            :     { .version = "CloudFront-Upstream-TLS-1-2-2025", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls12, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2042                 :            :     { .version = "CloudFront-Upstream-TLS-1-3-2025", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls13, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2043                 :            :     { .version = "CloudFront-Upstream-2025-PQ", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2044                 :            :     { .version = "CloudFront-Upstream-TLS-1-0-2025-PQ", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls10_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2045                 :            :     { .version = "CloudFront-Upstream-TLS-1-1-2025-PQ", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls11_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2046                 :            :     { .version = "CloudFront-Upstream-TLS-1-2-2025-PQ", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls12_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2047                 :            :     { .version = "CloudFront-Upstream-TLS-1-3-2025-PQ", .security_policy = &security_policy_cloudfront_upstream_2025_08_08_tls13_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2048                 :            :     /* CloudFront Viewer Facing */
    2049                 :            :     { .version = "CloudFront-SSL-v-3", .security_policy = &security_policy_cloudfront_ssl_v_3, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2050                 :            :     { .version = "CloudFront-TLS-1-0-2014", .security_policy = &security_policy_cloudfront_tls_1_0_2014, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2051                 :            :     { .version = "CloudFront-TLS-1-0-2014-sha256", .security_policy = &security_policy_cloudfront_tls_1_0_2014_sha256, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2052                 :            :     { .version = "CloudFront-TLS-1-0-2016", .security_policy = &security_policy_cloudfront_tls_1_0_2016, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2053                 :            :     { .version = "CloudFront-TLS-1-1-2016", .security_policy = &security_policy_cloudfront_tls_1_1_2016, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2054                 :            :     { .version = "CloudFront-TLS-1-2-2017", .security_policy = &security_policy_cloudfront_tls_1_2_2017, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2055                 :            :     { .version = "CloudFront-TLS-1-2-2018-no-sha1", .security_policy = &security_policy_cloudfront_tls_1_2_2018_no_sha1, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2056                 :            :     { .version = "CloudFront-TLS-1-2-2019-no-sha1", .security_policy = &security_policy_cloudfront_tls_1_2_2019_no_sha1, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2057                 :            :     { .version = "CloudFront-TLS-1-2-2021-no-sha1", .security_policy = &security_policy_cloudfront_tls_1_2_2021_no_sha1, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2058                 :            :     { .version = "CloudFront-TLS-1-2-2025", .security_policy = &security_policy_cloudfront_tls_1_2_2025, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2059                 :            :     { .version = "CloudFront-TLS-1-3-2025", .security_policy = &security_policy_cloudfront_tls_1_3_2025, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2060                 :            :     /* CloudFront Non-PQ Viewer Facing */
    2061                 :            :     { .version = "CloudFront-SSL-v-3-no-pq", .security_policy = &security_policy_cloudfront_ssl_v_3_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2062                 :            :     { .version = "CloudFront-TLS-1-0-2014-no-pq", .security_policy = &security_policy_cloudfront_tls_1_0_2014_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2063                 :            :     { .version = "CloudFront-TLS-1-0-2014-sha256-no-pq", .security_policy = &security_policy_cloudfront_tls_1_0_2014_sha256_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2064                 :            :     { .version = "CloudFront-TLS-1-0-2016-no-pq", .security_policy = &security_policy_cloudfront_tls_1_0_2016_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2065                 :            :     { .version = "CloudFront-TLS-1-1-2016-no-pq", .security_policy = &security_policy_cloudfront_tls_1_1_2016_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2066                 :            :     { .version = "CloudFront-TLS-1-2-2017-no-pq", .security_policy = &security_policy_cloudfront_tls_1_2_2017_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2067                 :            :     { .version = "CloudFront-TLS-1-2-2018-no-sha1-no-pq", .security_policy = &security_policy_cloudfront_tls_1_2_2018_no_sha1_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2068                 :            :     { .version = "CloudFront-TLS-1-2-2019-no-sha1-no-pq", .security_policy = &security_policy_cloudfront_tls_1_2_2019_no_sha1_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2069                 :            :     { .version = "CloudFront-TLS-1-2-2021-no-sha1-no-pq", .security_policy = &security_policy_cloudfront_tls_1_2_2021_no_sha1_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2070                 :            :     { .version = "CloudFront-TLS-1-2-2025-no-pq", .security_policy = &security_policy_cloudfront_tls_1_2_2025_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2071                 :            :     { .version = "CloudFront-TLS-1-3-2025-no-pq", .security_policy = &security_policy_cloudfront_tls_1_3_2025_no_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2072                 :            :     /* CloudFront Unofficial Viewer Facing */
    2073                 :            :     { .version = "CloudFront-TLS-1-0-2014-PQ-Beta", .security_policy = &security_policy_cloudfront_tls_1_0_2014_pq_beta, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2074                 :            :     { .version = "CloudFront-TLS-1-2-2021-no-sha1-PQ-Beta", .security_policy = &security_policy_cloudfront_tls_1_2_2021_no_sha1_pq_beta, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2075                 :            :     { .version = "CloudFront-TLS-1-2-2018-Beta", .security_policy = &security_policy_cloudfront_tls_1_2_2018_beta, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2076                 :            :     { .version = "CloudFront-TLS-1-2-2021-Chacha20-Boosted", .security_policy = &security_policy_cloudfront_tls_1_2_2021_chacha20_boosted, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2077                 :            :     /* CloudFront Legacy policies */
    2078                 :            :     { .version = "CloudFront-SSL-v-3-Legacy", .security_policy = &security_policy_cloudfront_ssl_v_3_legacy, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2079                 :            :     { .version = "CloudFront-TLS-1-0-2014-Legacy", .security_policy = &security_policy_cloudfront_tls_1_0_2014_legacy, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2080                 :            :     { .version = "CloudFront-TLS-1-0-2016-Legacy", .security_policy = &security_policy_cloudfront_tls_1_0_2016_legacy, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2081                 :            :     { .version = "CloudFront-TLS-1-1-2016-Legacy", .security_policy = &security_policy_cloudfront_tls_1_1_2016_legacy, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2082                 :            :     { .version = "CloudFront-TLS-1-2-2018-Legacy", .security_policy = &security_policy_cloudfront_tls_1_2_2018_legacy, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2083                 :            :     { .version = "CloudFront-TLS-1-2-2019-Legacy", .security_policy = &security_policy_cloudfront_tls_1_2_2019_legacy, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2084                 :            :     { .version = "CloudFront-TLS-1-2-2018", .security_policy = &security_policy_cloudfront_tls_1_2_2018, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2085                 :            :     { .version = "CloudFront-TLS-1-2-2019", .security_policy = &security_policy_cloudfront_tls_1_2_2019, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2086                 :            :     { .version = "CloudFront-TLS-1-2-2021", .security_policy = &security_policy_cloudfront_tls_1_2_2021, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2087                 :            :     { .version = "CloudFront-TLS-1-2-2021-PQ", .security_policy = &security_policy_cloudfront_tls_1_2_2021_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2088                 :            :     /* CRT allows users to choose the minimal TLS protocol they want to negotiate with. This translates to 5 different security policies in s2n */
    2089                 :            :     { .version = "AWS-CRT-SDK-SSLv3.0", .security_policy = &security_policy_aws_crt_sdk_ssl_v3, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2090                 :            :     { .version = "AWS-CRT-SDK-TLSv1.0", .security_policy = &security_policy_aws_crt_sdk_tls_10, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2091                 :            :     { .version = "AWS-CRT-SDK-TLSv1.1", .security_policy = &security_policy_aws_crt_sdk_tls_11, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2092                 :            :     { .version = "AWS-CRT-SDK-TLSv1.2", .security_policy = &security_policy_aws_crt_sdk_tls_12, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2093                 :            :     { .version = "AWS-CRT-SDK-TLSv1.3", .security_policy = &security_policy_aws_crt_sdk_tls_13, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2094                 :            :     { .version = "AWS-CRT-SDK-SSLv3.0-2023", .security_policy = &security_policy_aws_crt_sdk_ssl_v3_06_23, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2095                 :            :     { .version = "AWS-CRT-SDK-TLSv1.0-2023", .security_policy = &security_policy_aws_crt_sdk_tls_10_06_23, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2096                 :            :     { .version = "AWS-CRT-SDK-TLSv1.0-2025-PQ", .security_policy = &security_policy_aws_crt_sdk_tls_10_07_25_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2097                 :            :     { .version = "AWS-CRT-SDK-TLSv1.1-2023", .security_policy = &security_policy_aws_crt_sdk_tls_11_06_23, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2098                 :            :     { .version = "AWS-CRT-SDK-TLSv1.2-2023", .security_policy = &security_policy_aws_crt_sdk_tls_12_06_23, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2099                 :            :     { .version = "AWS-CRT-SDK-TLSv1.2-2023-PQ", .security_policy = &security_policy_aws_crt_sdk_tls_12_06_23_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2100                 :            :     { .version = "AWS-CRT-SDK-TLSv1.2-2025", .security_policy = &security_policy_aws_crt_sdk_tls_30_06_25, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2101                 :            :     { .version = "AWS-CRT-SDK-TLSv1.2-2025-PQ", .security_policy = &security_policy_aws_crt_sdk_tls_12_07_25_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2102                 :            :     { .version = "AWS-CRT-SDK-TLSv1.3-2023", .security_policy = &security_policy_aws_crt_sdk_tls_13_06_23, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2103                 :            :     { .version = "AWS-CRT-SDK-TLSv1.3-2025-PQ", .security_policy = &security_policy_aws_crt_sdk_tls_13_07_25_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2104                 :            :     /* KMS TLS Policies*/
    2105                 :            :     { .version = "KMS-TLS-1-0-2018-10", .security_policy = &security_policy_kms_tls_1_0_2018_10, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2106                 :            :     { .version = "KMS-TLS-1-0-2021-08", .security_policy = &security_policy_kms_tls_1_0_2021_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2107                 :            :     { .version = "KMS-TLS-1-2-2023-06", .security_policy = &security_policy_kms_tls_1_2_2023_06, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2108                 :            :     { .version = "KMS-FIPS-TLS-1-2-2018-10", .security_policy = &security_policy_kms_fips_tls_1_2_2018_10, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2109                 :            :     { .version = "KMS-FIPS-TLS-1-2-2021-08", .security_policy = &security_policy_kms_fips_tls_1_2_2021_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2110                 :            :     { .version = "KMS-FIPS-TLS-1-2-2024-10", .security_policy = &security_policy_kms_fips_tls_1_2_2024_10, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2111                 :            :     { .version = "20170816_healthcheck", .security_policy = &security_policy_20170816_healthcheck, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2112                 :            :     { .version = "KMS-TLS-1-2-2023-07", .security_policy = &security_policy_kms_tls_1_2_2023_07, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2113                 :            :     { .version = "KMS-FIPS-TLS-1-2-2023-09", .security_policy = &security_policy_kms_fips_tls_1_2_2023_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2114                 :            :     { .version = "PQ-TLS-1-2-2024-10-07", .security_policy = &security_policy_pq_tls_1_2_2024_10_07, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2115                 :            :     { .version = "PQ-TLS-1-2-2024-10-08", .security_policy = &security_policy_pq_tls_1_2_2024_10_08, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2116                 :            :     { .version = "PQ-TLS-1-2-2024-10-08_gcm", .security_policy = &security_policy_pq_tls_1_2_2024_10_08_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2117                 :            :     { .version = "PQ-TLS-1-2-2024-10-09", .security_policy = &security_policy_pq_tls_1_2_2024_10_09, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2118                 :            :     { .version = "20140601", .security_policy = &security_policy_20140601, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2119                 :            :     { .version = "20141001", .security_policy = &security_policy_20141001, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2120                 :            :     { .version = "20150202", .security_policy = &security_policy_20150202, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2121                 :            :     { .version = "20150214", .security_policy = &security_policy_20150214, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2122                 :            :     { .version = "20150306", .security_policy = &security_policy_20150306, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2123                 :            :     { .version = "20160411", .security_policy = &security_policy_20160411, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2124                 :            :     { .version = "20160804", .security_policy = &security_policy_20160804, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2125                 :            :     { .version = "20160824", .security_policy = &security_policy_20160824, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2126                 :            :     { .version = "20170210", .security_policy = &security_policy_20170210, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2127                 :            :     { .version = "20170328", .security_policy = &security_policy_20170328, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2128                 :            :     { .version = "20170328_gcm", .security_policy = &security_policy_20170328_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2129                 :            :     { .version = "20190214", .security_policy = &security_policy_20190214, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2130                 :            :     { .version = "20190214_gcm", .security_policy = &security_policy_20190214_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2131                 :            :     { .version = "20210825", .security_policy = &security_policy_20210825, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2132                 :            :     { .version = "20210825_gcm", .security_policy = &security_policy_20210825_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2133                 :            :     { .version = "20170405", .security_policy = &security_policy_20170405, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2134                 :            :     { .version = "20170405_gcm", .security_policy = &security_policy_20170405_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2135                 :            :     { .version = "20170718", .security_policy = &security_policy_20170718, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2136                 :            :     { .version = "20170718_gcm", .security_policy = &security_policy_20170718_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2137                 :            :     { .version = "20190120", .security_policy = &security_policy_20190120, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2138                 :            :     { .version = "20190121", .security_policy = &security_policy_20190121, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2139                 :            :     { .version = "20190122", .security_policy = &security_policy_20190122, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2140                 :            :     { .version = "20190801", .security_policy = &security_policy_20190801, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2141                 :            :     { .version = "20190802", .security_policy = &security_policy_20190802, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2142                 :            :     { .version = "20200207", .security_policy = &security_policy_20200207, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2143                 :            :     { .version = "20200207_pq", .security_policy = &security_policy_20200207_pq, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2144                 :            :     { .version = "20201021", .security_policy = &security_policy_20201021, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2145                 :            :     { .version = "20210816", .security_policy = &security_policy_20210816, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2146                 :            :     { .version = "20210422_INTB", .security_policy = &security_policy_intb_2021_04, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2147                 :            :     { .version = "20210422_INTB_gcm", .security_policy = &security_policy_intb_2021_04_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2148                 :            :     { .version = "20210816_GCM", .security_policy = &security_policy_20210816_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2149                 :            :     { .version = "20240603", .security_policy = &security_policy_20240603, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2150                 :            :     { .version = "20250211", .security_policy = &security_policy_20250211, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2151                 :            :     { .version = "20250414", .security_policy = &security_policy_20250414, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2152                 :            :     { .version = "20250429", .security_policy = &security_policy_20250429, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2153                 :            :     { .version = "20251013", .security_policy = &security_policy_20251013, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2154                 :            :     { .version = "20251113", .security_policy = &security_policy_20251113, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2155                 :            :     { .version = "20251114", .security_policy = &security_policy_20251114, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2156                 :            :     { .version = "20251115", .security_policy = &security_policy_20251115, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2157                 :            :     { .version = "20251116", .security_policy = &security_policy_20251116, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2158                 :            :     /* the same as 20251114, but without any SHA1 HMAC ciphers */
    2159                 :            :     { .version = "20251117", .security_policy = &security_policy_20251117, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2160                 :            :     { .version = "20260219", .security_policy = &security_policy_20260219, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2161                 :            :     { .version = "20260220", .security_policy = &security_policy_20260220, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2162                 :            :     { .version = "20260513", .security_policy = &security_policy_20260513, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2163                 :            :     { .version = "20260520", .security_policy = &security_policy_20260520, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2164                 :            :     { .version = "20260520_gcm", .security_policy = &security_policy_20260520_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2165                 :            :     { .version = "20260521", .security_policy = &security_policy_20260521, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2166                 :            :     { .version = "20260521_gcm", .security_policy = &security_policy_20260521_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2167                 :            :     { .version = "20260522", .security_policy = &security_policy_20260522, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2168                 :            :     { .version = "20260522_gcm", .security_policy = &security_policy_20260522_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2169                 :            :     { .version = "20260523", .security_policy = &security_policy_20260523, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2170                 :            :     { .version = "20260523_gcm", .security_policy = &security_policy_20260523_gcm, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2171                 :            :     { .version = "20260720", .security_policy = &security_policy_20260720, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2172                 :            :     { .version = "20260722", .security_policy = &security_policy_20260722, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2173                 :            :     /* If changing this, please update the usage guide's docs on the corresponding policy. */
    2174                 :            :     { .version = "rfc9151", .security_policy = &security_policy_20251013, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2175                 :            :     { .version = "cnsa_1", .security_policy = &security_policy_20251013, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2176                 :            :     { .version = "cnsa_2", .security_policy = &security_policy_20260219, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2177                 :            :     { .version = "cnsa_1_2_interop", .security_policy = &security_policy_20260220, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2178                 :            :     { .version = "test_all", .security_policy = &security_policy_test_all, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2179                 :            :     { .version = "test_all_fips", .security_policy = &security_policy_test_all_fips, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2180                 :            :     { .version = "test_all_ecdsa", .security_policy = &security_policy_test_all_ecdsa, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2181                 :            :     { .version = "test_all_rsa_kex", .security_policy = &security_policy_test_all_rsa_kex, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2182                 :            :     { .version = "test_ecdsa_priority", .security_policy = &security_policy_test_ecdsa_priority, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2183                 :            :     { .version = "test_all_tls12", .security_policy = &security_policy_test_all_tls12, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2184                 :            :     { .version = "test_all_tls13", .security_policy = &security_policy_test_all_tls13, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2185                 :            :     { .version = "test_pq_only", .security_policy = &security_policy_test_pq_only, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2186                 :            :     { .version = "null", .security_policy = &security_policy_null, .ecc_extension_required = 0, .pq_kem_extension_required = 0 },
    2187                 :            :     { .version = NULL, .security_policy = NULL, .ecc_extension_required = 0, .pq_kem_extension_required = 0 }
    2188                 :            : };
    2189                 :            : 
    2190                 :            : const char *deprecated_security_policies[] = {
    2191                 :            :     "KMS-PQ-TLS-1-0-2019-06",
    2192                 :            :     "KMS-PQ-TLS-1-0-2020-02",
    2193                 :            :     "KMS-PQ-TLS-1-0-2020-07",
    2194                 :            :     "PQ-TLS-1-0-2020-12",
    2195                 :            :     "PQ-TLS-1-1-2021-05-17",
    2196                 :            :     "PQ-TLS-1-0-2021-05-18",
    2197                 :            :     "PQ-TLS-1-0-2021-05-19",
    2198                 :            :     "PQ-TLS-1-0-2021-05-20",
    2199                 :            :     "PQ-TLS-1-1-2021-05-21",
    2200                 :            :     "PQ-TLS-1-0-2021-05-22",
    2201                 :            :     "PQ-TLS-1-0-2021-05-23",
    2202                 :            :     "PQ-TLS-1-0-2021-05-24",
    2203                 :            :     "PQ-TLS-1-0-2021-05-25",
    2204                 :            :     "PQ-TLS-1-0-2021-05-26",
    2205                 :            :     "PQ-TLS-1-0-2023-01-24",
    2206                 :            :     "PQ-TLS-1-2-2023-04-07",
    2207                 :            :     "PQ-TLS-1-2-2023-04-08",
    2208                 :            :     "PQ-TLS-1-2-2023-04-09",
    2209                 :            :     "PQ-TLS-1-2-2023-04-10",
    2210                 :            :     "PQ-TLS-1-3-2023-06-01",
    2211                 :            :     "PQ-TLS-1-2-2023-10-07",
    2212                 :            :     "PQ-TLS-1-2-2023-10-08",
    2213                 :            :     "PQ-TLS-1-2-2023-10-09",
    2214                 :            :     "PQ-TLS-1-2-2023-10-10",
    2215                 :            :     "PQ-TLS-1-2-2023-12-13",
    2216                 :            :     "PQ-TLS-1-2-2023-12-14",
    2217                 :            :     "PQ-TLS-1-2-2023-12-15",
    2218                 :            :     "PQ-SIKE-TEST-TLS-1-0-2019-11",
    2219                 :            :     "PQ-SIKE-TEST-TLS-1-0-2020-02",
    2220                 :            :     "20240730",
    2221                 :            : };
    2222                 :            : const size_t deprecated_security_policies_len = s2n_array_len(deprecated_security_policies);
    2223                 :            : 
    2224                 :            : int s2n_find_security_policy_from_version(const char *version, const struct s2n_security_policy **security_policy)
    2225                 :       6073 : {
    2226 [ +  + ][ +  - ]:       6073 :     POSIX_ENSURE_REF(version);
    2227 [ -  + ][ #  # ]:       6071 :     POSIX_ENSURE_REF(security_policy);
    2228                 :            : 
    2229         [ +  + ]:     122265 :     for (int i = 0; security_policy_selection[i].version != NULL; i++) {
    2230         [ +  + ]:     122230 :         if (!strcasecmp(version, security_policy_selection[i].version)) {
    2231                 :       6036 :             *security_policy = security_policy_selection[i].security_policy;
    2232                 :       6036 :             return 0;
    2233                 :       6036 :         }
    2234                 :     122230 :     }
    2235                 :            : 
    2236         [ +  + ]:        615 :     for (size_t i = 0; i < deprecated_security_policies_len; i++) {
    2237         [ +  + ]:        612 :         if (!strcasecmp(version, deprecated_security_policies[i])) {
    2238         [ +  - ]:         32 :             POSIX_BAIL(S2N_ERR_DEPRECATED_SECURITY_POLICY);
    2239                 :         32 :         }
    2240                 :        612 :     }
    2241                 :            : 
    2242         [ +  - ]:          3 :     POSIX_BAIL(S2N_ERR_INVALID_SECURITY_POLICY);
    2243                 :          3 : }
    2244                 :            : 
    2245                 :            : /* Find the label e.g. "20190422" for a given security policy 
    2246                 :            :  *
    2247                 :            :  * This relies on the exact security policy pointer being available in the security
    2248                 :            :  * policy table. If no match is found in the security policy table then "unknown"
    2249                 :            :  * will be returned.
    2250                 :            :  * 
    2251                 :            :  * Note that a given security policy may appear in the security policy table multiple
    2252                 :            :  * times under different names. This is the case for our default policy, which 
    2253                 :            :  * has both a `default` and numbered label. This function will return the label
    2254                 :            :  * of the first matching entry.
    2255                 :            :  * 
    2256                 :            :  * The returned `char *` is static memory and must not be freed by the application.
    2257                 :            :  */
    2258                 :            : const char *s2n_find_version_from_security_policy(const struct s2n_security_policy *security_policy)
    2259                 :      20816 : {
    2260         [ +  + ]:    1329428 :     for (int i = 0; security_policy_selection[i].version != NULL; i++) {
    2261         [ +  + ]:    1324808 :         if (security_policy_selection[i].security_policy == security_policy) {
    2262                 :      16196 :             return security_policy_selection[i].version;
    2263                 :      16196 :         }
    2264                 :    1324808 :     }
    2265                 :            : 
    2266                 :       4620 :     return "unknown";
    2267                 :      20816 : }
    2268                 :            : 
    2269                 :            : static int s2n_config_validate_security_policy(struct s2n_config *config, const struct s2n_security_policy *security_policy)
    2270                 :       6150 : {
    2271 [ -  + ][ #  # ]:       6150 :     POSIX_ENSURE_REF(config);
    2272 [ -  + ][ #  # ]:       6150 :     POSIX_ENSURE_REF(security_policy);
    2273 [ -  + ][ #  # ]:       6150 :     POSIX_ENSURE_REF(security_policy->cipher_preferences);
    2274 [ -  + ][ #  # ]:       6150 :     POSIX_ENSURE_REF(security_policy->kem_preferences);
    2275 [ -  + ][ #  # ]:       6150 :     POSIX_ENSURE_REF(security_policy->signature_preferences);
    2276 [ -  + ][ #  # ]:       6150 :     POSIX_ENSURE_REF(security_policy->ecc_preferences);
    2277                 :            : 
    2278                 :            :     /* If the security policy's minimum version is higher than what libcrypto supports, return an error. */
    2279 [ -  + ][ #  # ]:       6150 :     POSIX_ENSURE((security_policy->minimum_protocol_version <= s2n_get_highest_fully_supported_tls_version()), S2N_ERR_PROTOCOL_VERSION_UNSUPPORTED);
    2280                 :            : 
    2281         [ +  + ]:       6150 :     if (security_policy == &security_policy_null) {
    2282                 :          4 :         return S2N_SUCCESS;
    2283                 :          4 :     }
    2284                 :            : 
    2285                 :            :     /* Ensure that all strongly preferred groups are supported by our libcrypto. */
    2286 [ -  + ][ #  # ]:       6146 :     for (size_t i = 0; security_policy->strongly_preferred_groups != NULL && i < security_policy->strongly_preferred_groups->count; i++) {
    2287                 :          0 :         const struct s2n_kem_group *strongly_preferred_kem_group = NULL;
    2288                 :          0 :         bool found_kem_group_from_iana = false;
    2289         [ #  # ]:          0 :         POSIX_GUARD(s2n_find_kem_group_from_iana_id(security_policy->strongly_preferred_groups->iana_ids[i], &strongly_preferred_kem_group, &found_kem_group_from_iana));
    2290                 :            : 
    2291         [ #  # ]:          0 :         if (found_kem_group_from_iana) {
    2292 [ #  # ][ #  # ]:          0 :             POSIX_ENSURE(s2n_kem_group_is_available(strongly_preferred_kem_group), S2N_ERR_INVALID_SECURITY_POLICY);
    2293                 :          0 :         }
    2294                 :          0 :     }
    2295                 :            : 
    2296                 :            :     /* Ensure that an ECC or PQ key exchange can occur. */
    2297                 :       6146 :     uint32_t ecc_available = security_policy->ecc_preferences->count;
    2298                 :       6146 :     uint32_t kem_groups_available = 0;
    2299         [ -  + ]:       6146 :     POSIX_GUARD_RESULT(s2n_kem_preferences_groups_available(security_policy->kem_preferences, &kem_groups_available));
    2300 [ +  - ][ +  + ]:       6146 :     POSIX_ENSURE(ecc_available + kem_groups_available > 0, S2N_ERR_INVALID_SECURITY_POLICY);
    2301                 :            : 
    2302                 :            :     /* If the config contains certificates violating the security policy cert preferences, return an error. */
    2303         [ +  + ]:       6144 :     POSIX_GUARD_RESULT(s2n_config_validate_loaded_certificates(config, security_policy));
    2304                 :       6142 :     return S2N_SUCCESS;
    2305                 :       6144 : }
    2306                 :            : 
    2307                 :            : int s2n_config_set_security_policy(struct s2n_config *config, const struct s2n_security_policy *security_policy)
    2308                 :       4499 : {
    2309 [ -  + ][ #  # ]:       4499 :     POSIX_ENSURE_REF(config);
    2310         [ +  + ]:       4499 :     POSIX_GUARD(s2n_config_validate_security_policy(config, security_policy));
    2311                 :       4496 :     config->security_policy = security_policy;
    2312                 :       4496 :     return 0;
    2313                 :       4499 : }
    2314                 :            : 
    2315                 :            : int s2n_config_set_cipher_preferences(struct s2n_config *config, const char *version)
    2316                 :       4501 : {
    2317                 :       4501 :     const struct s2n_security_policy *security_policy = NULL;
    2318         [ +  + ]:       4501 :     POSIX_GUARD(s2n_find_security_policy_from_version(version, &security_policy));
    2319         [ +  + ]:       4499 :     POSIX_GUARD(s2n_config_set_security_policy(config, security_policy));
    2320                 :       4496 :     return S2N_SUCCESS;
    2321                 :       4499 : }
    2322                 :            : 
    2323                 :            : int s2n_connection_set_security_policy(struct s2n_connection *conn, const struct s2n_security_policy *security_policy)
    2324                 :       1651 : {
    2325 [ -  + ][ #  # ]:       1651 :     POSIX_ENSURE_REF(conn);
    2326         [ +  + ]:       1651 :     POSIX_GUARD(s2n_config_validate_security_policy(conn->config, security_policy));
    2327                 :       1650 :     conn->security_policy_override = security_policy;
    2328                 :       1650 :     return 0;
    2329                 :       1651 : }
    2330                 :            : 
    2331                 :            : int s2n_connection_set_cipher_preferences(struct s2n_connection *conn, const char *version)
    2332                 :       1263 : {
    2333                 :       1263 :     const struct s2n_security_policy *security_policy = NULL;
    2334         [ +  + ]:       1263 :     POSIX_GUARD(s2n_find_security_policy_from_version(version, &security_policy));
    2335         [ +  + ]:       1261 :     POSIX_GUARD(s2n_connection_set_security_policy(conn, security_policy));
    2336                 :       1260 :     return S2N_SUCCESS;
    2337                 :       1261 : }
    2338                 :            : 
    2339                 :            : int s2n_security_policies_init()
    2340                 :        349 : {
    2341         [ +  + ]:      75733 :     for (int i = 0; security_policy_selection[i].version != NULL; i++) {
    2342                 :      75384 :         const struct s2n_security_policy *security_policy = security_policy_selection[i].security_policy;
    2343 [ #  # ][ -  + ]:      75384 :         POSIX_ENSURE_REF(security_policy);
    2344                 :      75384 :         const struct s2n_cipher_preferences *cipher_preference = security_policy->cipher_preferences;
    2345 [ #  # ][ -  + ]:      75384 :         POSIX_ENSURE_REF(cipher_preference);
    2346                 :      75384 :         const struct s2n_kem_preferences *kem_preference = security_policy->kem_preferences;
    2347 [ #  # ][ -  + ]:      75384 :         POSIX_ENSURE_REF(kem_preference);
    2348                 :      75384 :         const struct s2n_ecc_preferences *ecc_preference = security_policy->ecc_preferences;
    2349 [ #  # ][ -  + ]:      75384 :         POSIX_ENSURE_REF(ecc_preference);
    2350         [ -  + ]:      75384 :         POSIX_GUARD(s2n_check_ecc_preferences_curves_list(ecc_preference));
    2351                 :            : 
    2352                 :      75384 :         const struct s2n_signature_preferences *certificate_signature_preference = security_policy->certificate_signature_preferences;
    2353         [ +  + ]:      75384 :         if (certificate_signature_preference != NULL) {
    2354         [ -  + ]:      23732 :             POSIX_GUARD_RESULT(s2n_validate_certificate_signature_preferences(certificate_signature_preference));
    2355                 :      23732 :         }
    2356                 :            : 
    2357         [ +  + ]:      75384 :         if (security_policy != &security_policy_null) {
    2358                 :            :             /* All policies must have at least one ecc curve or PQ kem group configured. */
    2359                 :      75035 :             bool ecc_kx_supported = ecc_preference->count > 0;
    2360                 :      75035 :             bool pq_kx_supported = kem_preference->tls13_kem_group_count > 0;
    2361 [ #  # ][ +  - ]:      75035 :             POSIX_ENSURE(ecc_kx_supported || pq_kx_supported, S2N_ERR_INVALID_SECURITY_POLICY);
                 [ +  + ]
    2362                 :            : 
    2363                 :            :             /* A PQ key exchange is only supported in TLS 1.3, so PQ-only policies must require TLS 1.3.*/
    2364         [ +  + ]:      75035 :             if (!ecc_kx_supported) {
    2365 [ #  # ][ -  + ]:       1047 :                 POSIX_ENSURE(security_policy->minimum_protocol_version >= S2N_TLS13, S2N_ERR_INVALID_SECURITY_POLICY);
    2366                 :       1047 :             }
    2367                 :      75035 :         }
    2368                 :            : 
    2369         [ +  + ]:    1088880 :         for (int j = 0; j < cipher_preference->count; j++) {
    2370                 :    1013496 :             struct s2n_cipher_suite *cipher = cipher_preference->suites[j];
    2371 [ -  + ][ #  # ]:    1013496 :             POSIX_ENSURE_REF(cipher);
    2372                 :            : 
    2373                 :    1013496 :             const uint8_t *iana = cipher->iana_value;
    2374                 :            : 
    2375         [ +  + ]:    1013496 :             if (cipher->minimum_required_tls_version >= S2N_TLS13) {
    2376                 :     132620 :                 security_policy_selection[i].supports_tls13 = 1;
    2377                 :     132620 :             }
    2378                 :            : 
    2379                 :            :             /* Sanity check that valid tls13 has minimum tls version set correctly */
    2380 [ -  + ][ #  # ]:    1013496 :             S2N_ERROR_IF(s2n_is_valid_tls13_cipher(iana) ^ (cipher->minimum_required_tls_version >= S2N_TLS13),
    2381                 :    1013496 :                     S2N_ERR_INVALID_SECURITY_POLICY);
    2382                 :            : 
    2383         [ +  + ]:    1013496 :             if (s2n_cipher_suite_requires_ecc_extension(cipher)) {
    2384                 :     722779 :                 security_policy_selection[i].ecc_extension_required = 1;
    2385                 :     722779 :             }
    2386                 :            : 
    2387 [ -  + ][ #  # ]:    1013496 :             if (s2n_cipher_suite_requires_pq_extension(cipher) && kem_preference->kem_count > 0) {
    2388                 :          0 :                 security_policy_selection[i].pq_kem_extension_required = 1;
    2389                 :          0 :             }
    2390                 :    1013496 :         }
    2391                 :            : 
    2392         [ -  + ]:      75384 :         POSIX_GUARD(s2n_validate_kem_preferences(kem_preference, security_policy_selection[i].pq_kem_extension_required));
    2393                 :            : 
    2394                 :            :         /* Validate that security rules are correctly applied.
    2395                 :            :          * This should be checked by a unit test, but outside of unit tests we
    2396                 :            :          * check again here to cover the case where the unit tests are not run.
    2397                 :            :          */
    2398         [ -  + ]:      75384 :         if (!s2n_in_unit_test()) {
    2399                 :          0 :             struct s2n_security_rule_result result = { 0 };
    2400         [ #  # ]:          0 :             POSIX_GUARD_RESULT(s2n_security_policy_validate_security_rules(security_policy, &result));
    2401 [ #  # ][ #  # ]:          0 :             POSIX_ENSURE(!result.found_error, S2N_ERR_INVALID_SECURITY_POLICY);
    2402                 :          0 :         }
    2403                 :      75384 :     }
    2404                 :        349 :     return 0;
    2405                 :        349 : }
    2406                 :            : 
    2407                 :            : bool s2n_ecc_is_extension_required(const struct s2n_security_policy *security_policy)
    2408                 :      15791 : {
    2409         [ +  + ]:      15791 :     if (security_policy == NULL) {
    2410                 :          1 :         return false;
    2411                 :          1 :     }
    2412                 :            : 
    2413         [ +  + ]:    1548046 :     for (int i = 0; security_policy_selection[i].version != NULL; i++) {
    2414         [ +  + ]:    1542667 :         if (security_policy_selection[i].security_policy == security_policy) {
    2415                 :      10411 :             return 1 == security_policy_selection[i].ecc_extension_required;
    2416                 :      10411 :         }
    2417                 :    1542667 :     }
    2418                 :            : 
    2419                 :            :     /* If cipher preference is not in the official list, compute the result */
    2420                 :       5379 :     const struct s2n_cipher_preferences *cipher_preferences = security_policy->cipher_preferences;
    2421         [ -  + ]:       5379 :     if (cipher_preferences == NULL) {
    2422                 :          0 :         return false;
    2423                 :          0 :     }
    2424         [ +  + ]:     204141 :     for (size_t i = 0; i < cipher_preferences->count; i++) {
    2425         [ +  + ]:     201673 :         if (s2n_cipher_suite_requires_ecc_extension(cipher_preferences->suites[i])) {
    2426                 :       2911 :             return true;
    2427                 :       2911 :         }
    2428                 :     201673 :     }
    2429                 :            : 
    2430                 :       2468 :     return false;
    2431                 :       5379 : }
    2432                 :            : 
    2433                 :            : bool s2n_pq_kem_is_extension_required(const struct s2n_security_policy *security_policy)
    2434                 :       7901 : {
    2435         [ +  + ]:       7901 :     if (security_policy == NULL) {
    2436                 :          1 :         return false;
    2437                 :          1 :     }
    2438                 :            : 
    2439         [ +  + ]:     774670 :     for (int i = 0; security_policy_selection[i].version != NULL; i++) {
    2440         [ +  + ]:     771980 :         if (security_policy_selection[i].security_policy == security_policy) {
    2441                 :       5210 :             return 1 == security_policy_selection[i].pq_kem_extension_required;
    2442                 :       5210 :         }
    2443                 :     771980 :     }
    2444                 :            : 
    2445                 :            :     /* Preferences with no KEMs for the TLS 1.2 PQ KEM extension do not require that extension. */
    2446 [ +  - ][ +  + ]:       2690 :     if (security_policy->kem_preferences && security_policy->kem_preferences->kem_count == 0) {
    2447                 :       2689 :         return false;
    2448                 :       2689 :     }
    2449                 :            : 
    2450                 :            :     /* If cipher preference is not in the official list, compute the result */
    2451                 :          1 :     const struct s2n_cipher_preferences *cipher_preferences = security_policy->cipher_preferences;
    2452         [ -  + ]:          1 :     if (cipher_preferences == NULL) {
    2453                 :          0 :         return false;
    2454                 :          0 :     }
    2455         [ +  + ]:          2 :     for (size_t i = 0; i < cipher_preferences->count; i++) {
    2456         [ -  + ]:          1 :         if (s2n_cipher_suite_requires_pq_extension(cipher_preferences->suites[i])) {
    2457                 :          0 :             return true;
    2458                 :          0 :         }
    2459                 :          1 :     }
    2460                 :          1 :     return false;
    2461                 :          1 : }
    2462                 :            : 
    2463                 :            : /* Checks whether cipher preference supports TLS 1.3 based on whether it is configured
    2464                 :            :  * with TLS 1.3 ciphers. Returns true or false.
    2465                 :            :  */
    2466                 :            : bool s2n_security_policy_supports_tls13(const struct s2n_security_policy *security_policy)
    2467                 :      15945 : {
    2468         [ +  + ]:      15945 :     if (security_policy == NULL) {
    2469                 :          1 :         return false;
    2470                 :          1 :     }
    2471                 :            : 
    2472         [ +  + ]:    1315155 :     for (size_t i = 0; security_policy_selection[i].version != NULL; i++) {
    2473         [ +  + ]:    1310451 :         if (security_policy_selection[i].security_policy == security_policy) {
    2474                 :      11240 :             return security_policy_selection[i].supports_tls13 == 1;
    2475                 :      11240 :         }
    2476                 :    1310451 :     }
    2477                 :            : 
    2478                 :            :     /* if cipher preference is not in the official list, compute the result */
    2479                 :       4704 :     const struct s2n_cipher_preferences *cipher_preferences = security_policy->cipher_preferences;
    2480         [ -  + ]:       4704 :     if (cipher_preferences == NULL) {
    2481                 :          0 :         return false;
    2482                 :          0 :     }
    2483                 :            : 
    2484         [ +  + ]:     139392 :     for (size_t i = 0; i < cipher_preferences->count; i++) {
    2485         [ +  + ]:     136042 :         if (cipher_preferences->suites[i]->minimum_required_tls_version >= S2N_TLS13) {
    2486                 :       1354 :             return true;
    2487                 :       1354 :         }
    2488                 :     136042 :     }
    2489                 :            : 
    2490                 :       3350 :     return false;
    2491                 :       4704 : }
    2492                 :            : 
    2493                 :            : int s2n_connection_is_valid_for_cipher_preferences(struct s2n_connection *conn, const char *version)
    2494                 :          7 : {
    2495 [ -  + ][ #  # ]:          7 :     POSIX_ENSURE_REF(conn);
    2496 [ -  + ][ #  # ]:          7 :     POSIX_ENSURE_REF(version);
    2497 [ -  + ][ #  # ]:          7 :     POSIX_ENSURE_REF(conn->secure);
    2498 [ -  + ][ #  # ]:          7 :     POSIX_ENSURE_REF(conn->secure->cipher_suite);
    2499                 :            : 
    2500                 :          7 :     const struct s2n_security_policy *security_policy = NULL;
    2501         [ +  + ]:          7 :     POSIX_GUARD(s2n_find_security_policy_from_version(version, &security_policy));
    2502 [ -  + ][ #  # ]:          6 :     POSIX_ENSURE_REF(security_policy);
    2503                 :            : 
    2504                 :            :     /* make sure we don't use a tls version lower than that configured by the version */
    2505         [ +  + ]:          6 :     if (s2n_connection_get_actual_protocol_version(conn) < security_policy->minimum_protocol_version) {
    2506                 :          2 :         return 0;
    2507                 :          2 :     }
    2508                 :            : 
    2509                 :          4 :     struct s2n_cipher_suite *cipher = conn->secure->cipher_suite;
    2510 [ -  + ][ #  # ]:          4 :     POSIX_ENSURE_REF(cipher);
    2511         [ +  + ]:          9 :     for (int i = 0; i < security_policy->cipher_preferences->count; ++i) {
    2512         [ +  + ]:          8 :         if (s2n_constant_time_equals(security_policy->cipher_preferences->suites[i]->iana_value, cipher->iana_value, S2N_TLS_CIPHER_SUITE_LEN)) {
    2513                 :          3 :             return 1;
    2514                 :          3 :         }
    2515                 :          8 :     }
    2516                 :            : 
    2517                 :          1 :     return 0;
    2518                 :          4 : }
    2519                 :            : 
    2520                 :            : int s2n_validate_kem_preferences(const struct s2n_kem_preferences *kem_preferences, bool pq_kem_extension_required)
    2521                 :      75391 : {
    2522 [ +  + ][ +  - ]:      75391 :     POSIX_ENSURE_REF(kem_preferences);
    2523                 :            : 
    2524                 :            :     /* Basic sanity checks to assert that the count is 0 if and only if the associated list is NULL */
    2525 [ +  + ][ +  - ]:      75390 :     POSIX_ENSURE(S2N_IFF(kem_preferences->tls13_kem_group_count == 0, kem_preferences->tls13_kem_groups == NULL),
    2526                 :      75388 :             S2N_ERR_INVALID_SECURITY_POLICY);
    2527 [ +  - ][ +  + ]:      75388 :     POSIX_ENSURE(S2N_IFF(kem_preferences->kem_count == 0, kem_preferences->kems == NULL),
    2528                 :      75387 :             S2N_ERR_INVALID_SECURITY_POLICY);
    2529 [ #  # ][ -  + ]:      75387 :     POSIX_ENSURE(kem_preferences->tls13_kem_group_count <= S2N_KEM_GROUPS_COUNT, S2N_ERR_ARRAY_INDEX_OOB);
    2530                 :            : 
    2531                 :            :     /* The PQ KEM extension is applicable only to TLS 1.2 */
    2532         [ +  + ]:      75387 :     if (pq_kem_extension_required) {
    2533 [ +  - ][ +  - ]:          1 :         POSIX_ENSURE(kem_preferences->kem_count > 0, S2N_ERR_INVALID_SECURITY_POLICY);
    2534 [ #  # ][ #  # ]:          0 :         POSIX_ENSURE(kem_preferences->kems != NULL, S2N_ERR_INVALID_SECURITY_POLICY);
    2535                 :      75386 :     } else {
    2536 [ -  + ][ #  # ]:      75386 :         POSIX_ENSURE(kem_preferences->kem_count == 0, S2N_ERR_INVALID_SECURITY_POLICY);
    2537 [ -  + ][ #  # ]:      75386 :         POSIX_ENSURE(kem_preferences->kems == NULL, S2N_ERR_INVALID_SECURITY_POLICY);
    2538                 :      75386 :     }
    2539                 :            : 
    2540                 :      75386 :     return S2N_SUCCESS;
    2541                 :      75387 : }
    2542                 :            : 
    2543                 :            : S2N_RESULT s2n_validate_certificate_signature_preferences(const struct s2n_signature_preferences *certificate_signature_preferences)
    2544                 :      23735 : {
    2545 [ -  + ][ #  # ]:      23735 :     RESULT_ENSURE_REF(certificate_signature_preferences);
    2546                 :            : 
    2547                 :      23735 :     size_t rsa_pss_scheme_count = 0;
    2548                 :            : 
    2549         [ +  + ]:     275024 :     for (size_t i = 0; i < certificate_signature_preferences->count; i++) {
    2550         [ +  + ]:     251289 :         if (certificate_signature_preferences->signature_schemes[i]->libcrypto_nid == NID_rsassaPss) {
    2551                 :     106802 :             rsa_pss_scheme_count++;
    2552                 :     106802 :         }
    2553                 :     251289 :     }
    2554                 :            : 
    2555                 :            :     /*
    2556                 :            :      * https://github.com/aws/s2n-tls/issues/3435
    2557                 :            :      *
    2558                 :            :      * The Openssl function used to parse signatures off certificates does not differentiate between any rsa pss
    2559                 :            :      * signature schemes. Therefore a security policy with a certificate signatures preference list must include
    2560                 :            :      * all rsa_pss signature schemes. */
    2561 [ +  - ][ +  + ]:      23735 :     RESULT_ENSURE(rsa_pss_scheme_count == NUM_RSA_PSS_SCHEMES || rsa_pss_scheme_count == 0, S2N_ERR_INVALID_SECURITY_POLICY);
                 [ +  + ]
    2562                 :      23734 :     return S2N_RESULT_OK;
    2563                 :      23735 : }
    2564                 :            : 
    2565                 :            : S2N_RESULT s2n_security_policy_get_version(const struct s2n_security_policy *security_policy, const char **version)
    2566                 :        109 : {
    2567 [ #  # ][ -  + ]:        109 :     RESULT_ENSURE_REF(version);
    2568                 :        109 :     *version = NULL;
    2569         [ +  + ]:      12418 :     for (size_t i = 0; security_policy_selection[i].version != NULL; i++) {
    2570         [ +  + ]:      12403 :         if (security_policy_selection[i].security_policy == security_policy) {
    2571                 :         94 :             *version = security_policy_selection[i].version;
    2572                 :         94 :             return S2N_RESULT_OK;
    2573                 :         94 :         }
    2574                 :      12403 :     }
    2575         [ +  - ]:         15 :     RESULT_BAIL(S2N_ERR_INVALID_SECURITY_POLICY);
    2576                 :         15 : }
    2577                 :            : 
    2578                 :            : S2N_RESULT s2n_security_policy_validate_cert_signature(const struct s2n_security_policy *security_policy,
    2579                 :            :         const struct s2n_cert_info *info, s2n_error error)
    2580                 :        745 : {
    2581 [ #  # ][ -  + ]:        745 :     RESULT_ENSURE_REF(info);
    2582 [ #  # ][ -  + ]:        745 :     RESULT_ENSURE_REF(security_policy);
    2583                 :        745 :     const struct s2n_signature_preferences *sig_preferences = security_policy->certificate_signature_preferences;
    2584                 :            : 
    2585         [ +  + ]:        745 :     if (sig_preferences != NULL) {
    2586         [ +  + ]:       1707 :         for (size_t i = 0; i < sig_preferences->count; i++) {
    2587         [ +  + ]:       1696 :             if (sig_preferences->signature_schemes[i]->libcrypto_nid == info->signature_nid) {
    2588                 :        297 :                 return S2N_RESULT_OK;
    2589                 :        297 :             }
    2590                 :       1696 :         }
    2591                 :            : 
    2592         [ +  - ]:         11 :         RESULT_BAIL(error);
    2593                 :         11 :     }
    2594                 :        437 :     return S2N_RESULT_OK;
    2595                 :        745 : }
    2596                 :            : 
    2597                 :            : S2N_RESULT s2n_security_policy_validate_cert_key(const struct s2n_security_policy *security_policy,
    2598                 :            :         const struct s2n_cert_info *info, s2n_error error)
    2599                 :       1364 : {
    2600 [ -  + ][ #  # ]:       1364 :     RESULT_ENSURE_REF(info);
    2601 [ #  # ][ -  + ]:       1364 :     RESULT_ENSURE_REF(security_policy);
    2602                 :       1364 :     const struct s2n_certificate_key_preferences *key_preferences = security_policy->certificate_key_preferences;
    2603                 :            : 
    2604         [ +  + ]:       1364 :     if (key_preferences != NULL) {
    2605         [ +  + ]:        120 :         for (size_t i = 0; i < key_preferences->count; i++) {
    2606         [ +  + ]:        111 :             if (key_preferences->certificate_keys[i]->public_key_libcrypto_nid == info->public_key_nid
    2607         [ +  + ]:        111 :                     && key_preferences->certificate_keys[i]->bits == info->public_key_bits) {
    2608                 :         83 :                 return S2N_RESULT_OK;
    2609                 :         83 :             }
    2610                 :        111 :         }
    2611         [ +  - ]:          9 :         RESULT_BAIL(error);
    2612                 :          9 :     }
    2613                 :       1272 :     return S2N_RESULT_OK;
    2614                 :       1364 : }
    2615                 :            : 
    2616                 :            : S2N_RESULT s2n_security_policy_validate_certificate_chain(
    2617                 :            :         const struct s2n_security_policy *security_policy,
    2618                 :            :         const struct s2n_cert_chain_and_key *cert_key_pair)
    2619                 :       1277 : {
    2620 [ #  # ][ -  + ]:       1277 :     RESULT_ENSURE_REF(security_policy);
    2621 [ -  + ][ #  # ]:       1277 :     RESULT_ENSURE_REF(cert_key_pair);
    2622 [ -  + ][ #  # ]:       1277 :     RESULT_ENSURE_REF(cert_key_pair->cert_chain);
    2623                 :            : 
    2624         [ +  + ]:       1277 :     if (!security_policy->certificate_preferences_apply_locally) {
    2625                 :       1242 :         return S2N_RESULT_OK;
    2626                 :       1242 :     }
    2627                 :            : 
    2628                 :         35 :     struct s2n_cert *current = cert_key_pair->cert_chain->head;
    2629         [ +  + ]:        104 :     while (current != NULL) {
    2630         [ +  + ]:         84 :         RESULT_GUARD(s2n_security_policy_validate_cert_key(security_policy, &current->info,
    2631                 :         78 :                 S2N_ERR_SECURITY_POLICY_INCOMPATIBLE_CERT));
    2632         [ +  + ]:         78 :         RESULT_GUARD(s2n_security_policy_validate_cert_signature(security_policy, &current->info,
    2633                 :         69 :                 S2N_ERR_SECURITY_POLICY_INCOMPATIBLE_CERT));
    2634                 :         69 :         current = current->next;
    2635                 :         69 :     }
    2636                 :         20 :     return S2N_RESULT_OK;
    2637                 :         35 : }
    2638                 :            : 
    2639                 :            : /* The preference-list comparisons below all treat two NULL lists as equal and a
    2640                 :            :  * NULL list as unequal to a non-NULL one, because optional policy fields are left
    2641                 :            :  * NULL by the designated initializers used to define each security policy.
    2642                 :            :  *
    2643                 :            :  * List elements are compared by pointer. Every cipher suite, signature scheme,
    2644                 :            :  * curve, KEM, and certificate key is a singleton, so pointer identity is
    2645                 :            :  * equivalent to identity of the underlying algorithm.
    2646                 :            :  */
    2647                 :            : 
    2648                 :            : static bool s2n_cipher_preferences_equals(const struct s2n_cipher_preferences *a,
    2649                 :            :         const struct s2n_cipher_preferences *b)
    2650                 :       4195 : {
    2651         [ +  + ]:       4195 :     if (a == b) {
    2652                 :        326 :         return true;
    2653                 :        326 :     }
    2654 [ -  + ][ -  + ]:       3869 :     if (a == NULL || b == NULL) {
    2655                 :          0 :         return false;
    2656                 :          0 :     }
    2657         [ +  + ]:       3869 :     if (a->count != b->count) {
    2658                 :       3682 :         return false;
    2659                 :       3682 :     }
    2660         [ +  + ]:        187 :     if (a->allow_chacha20_boosting != b->allow_chacha20_boosting) {
    2661                 :          5 :         return false;
    2662                 :          5 :     }
    2663         [ +  + ]:        561 :     for (size_t i = 0; i < a->count; i++) {
    2664         [ +  + ]:        544 :         if (a->suites[i] != b->suites[i]) {
    2665                 :        165 :             return false;
    2666                 :        165 :         }
    2667                 :        544 :     }
    2668                 :         17 :     return true;
    2669                 :        182 : }
    2670                 :            : 
    2671                 :            : static bool s2n_signature_preferences_equals(const struct s2n_signature_preferences *a,
    2672                 :            :         const struct s2n_signature_preferences *b)
    2673                 :        485 : {
    2674         [ +  + ]:        485 :     if (a == b) {
    2675                 :        464 :         return true;
    2676                 :        464 :     }
    2677 [ -  + ][ -  + ]:         21 :     if (a == NULL || b == NULL) {
    2678                 :          0 :         return false;
    2679                 :          0 :     }
    2680         [ +  + ]:         21 :     if (a->count != b->count) {
    2681                 :         19 :         return false;
    2682                 :         19 :     }
    2683         [ +  - ]:          2 :     for (size_t i = 0; i < a->count; i++) {
    2684         [ +  - ]:          2 :         if (a->signature_schemes[i] != b->signature_schemes[i]) {
    2685                 :          2 :             return false;
    2686                 :          2 :         }
    2687                 :          2 :     }
    2688                 :          0 :     return true;
    2689                 :          2 : }
    2690                 :            : 
    2691                 :            : static bool s2n_ecc_preferences_equals(const struct s2n_ecc_preferences *a,
    2692                 :            :         const struct s2n_ecc_preferences *b)
    2693                 :        232 : {
    2694         [ +  + ]:        232 :     if (a == b) {
    2695                 :        224 :         return true;
    2696                 :        224 :     }
    2697 [ -  + ][ -  + ]:          8 :     if (a == NULL || b == NULL) {
    2698                 :          0 :         return false;
    2699                 :          0 :     }
    2700         [ +  + ]:          8 :     if (a->count != b->count) {
    2701                 :          3 :         return false;
    2702                 :          3 :     }
    2703         [ +  - ]:          5 :     for (size_t i = 0; i < a->count; i++) {
    2704         [ +  - ]:          5 :         if (a->ecc_curves[i] != b->ecc_curves[i]) {
    2705                 :          5 :             return false;
    2706                 :          5 :         }
    2707                 :          5 :     }
    2708                 :          0 :     return true;
    2709                 :          5 : }
    2710                 :            : 
    2711                 :            : static bool s2n_kem_preferences_equals(const struct s2n_kem_preferences *a,
    2712                 :            :         const struct s2n_kem_preferences *b)
    2713                 :        343 : {
    2714         [ +  + ]:        343 :     if (a == b) {
    2715                 :        253 :         return true;
    2716                 :        253 :     }
    2717 [ -  + ][ -  + ]:         90 :     if (a == NULL || b == NULL) {
    2718                 :          0 :         return false;
    2719                 :          0 :     }
    2720         [ -  + ]:         90 :     if (a->kem_count != b->kem_count) {
    2721                 :          0 :         return false;
    2722                 :          0 :     }
    2723         [ +  - ]:         90 :     if (a->tls13_kem_group_count != b->tls13_kem_group_count) {
    2724                 :         90 :         return false;
    2725                 :         90 :     }
    2726         [ #  # ]:          0 :     for (size_t i = 0; i < a->kem_count; i++) {
    2727         [ #  # ]:          0 :         if (a->kems[i] != b->kems[i]) {
    2728                 :          0 :             return false;
    2729                 :          0 :         }
    2730                 :          0 :     }
    2731         [ #  # ]:          0 :     for (size_t i = 0; i < a->tls13_kem_group_count; i++) {
    2732         [ #  # ]:          0 :         if (a->tls13_kem_groups[i] != b->tls13_kem_groups[i]) {
    2733                 :          0 :             return false;
    2734                 :          0 :         }
    2735                 :          0 :     }
    2736                 :          0 :     return true;
    2737                 :          0 : }
    2738                 :            : 
    2739                 :            : static bool s2n_supported_group_preferences_equals(const struct s2n_supported_group_preferences *a,
    2740                 :            :         const struct s2n_supported_group_preferences *b)
    2741                 :        224 : {
    2742         [ +  - ]:        224 :     if (a == b) {
    2743                 :        224 :         return true;
    2744                 :        224 :     }
    2745 [ #  # ][ #  # ]:          0 :     if (a == NULL || b == NULL) {
    2746                 :          0 :         return false;
    2747                 :          0 :     }
    2748         [ #  # ]:          0 :     if (a->count != b->count) {
    2749                 :          0 :         return false;
    2750                 :          0 :     }
    2751                 :            :     /* iana_ids holds IANA identifiers by value, not pointers to shared singletons. */
    2752         [ #  # ]:          0 :     for (size_t i = 0; i < a->count; i++) {
    2753         [ #  # ]:          0 :         if (a->iana_ids[i] != b->iana_ids[i]) {
    2754                 :          0 :             return false;
    2755                 :          0 :         }
    2756                 :          0 :     }
    2757                 :          0 :     return true;
    2758                 :          0 : }
    2759                 :            : 
    2760                 :            : static bool s2n_certificate_key_preferences_equals(const struct s2n_certificate_key_preferences *a,
    2761                 :            :         const struct s2n_certificate_key_preferences *b)
    2762                 :        224 : {
    2763         [ +  - ]:        224 :     if (a == b) {
    2764                 :        224 :         return true;
    2765                 :        224 :     }
    2766 [ #  # ][ #  # ]:          0 :     if (a == NULL || b == NULL) {
    2767                 :          0 :         return false;
    2768                 :          0 :     }
    2769         [ #  # ]:          0 :     if (a->count != b->count) {
    2770                 :          0 :         return false;
    2771                 :          0 :     }
    2772         [ #  # ]:          0 :     for (size_t i = 0; i < a->count; i++) {
    2773         [ #  # ]:          0 :         if (a->certificate_keys[i] != b->certificate_keys[i]) {
    2774                 :          0 :             return false;
    2775                 :          0 :         }
    2776                 :          0 :     }
    2777                 :          0 :     return true;
    2778                 :          0 : }
    2779                 :            : 
    2780                 :            : S2N_RESULT s2n_security_policy_equals(const struct s2n_security_policy *a,
    2781                 :            :         const struct s2n_security_policy *b, bool *equal)
    2782                 :      23425 : {
    2783 [ +  - ][ +  + ]:      23425 :     RESULT_ENSURE_REF(a);
    2784 [ +  - ][ +  + ]:      23424 :     RESULT_ENSURE_REF(b);
    2785 [ +  + ][ +  - ]:      23423 :     RESULT_ENSURE_MUT(equal);
    2786                 :            : 
    2787                 :            :     /* Set false up front so that any early return reports "not equal". Only the
    2788                 :            :      * fallthrough at the end, after every field has been compared, reports equal. */
    2789                 :      23422 :     *equal = false;
    2790                 :            : 
    2791         [ +  + ]:      23422 :     if (a->minimum_protocol_version != b->minimum_protocol_version) {
    2792                 :      15255 :         return S2N_RESULT_OK;
    2793                 :      15255 :     }
    2794         [ +  + ]:       8167 :     if (a->certificate_preferences_apply_locally != b->certificate_preferences_apply_locally) {
    2795                 :        450 :         return S2N_RESULT_OK;
    2796                 :        450 :     }
    2797         [ +  + ]:      16638 :     for (size_t i = 0; i < S2N_SECURITY_RULES_COUNT; i++) {
    2798         [ +  + ]:      12443 :         if (a->rules[i] != b->rules[i]) {
    2799                 :       3522 :             return S2N_RESULT_OK;
    2800                 :       3522 :         }
    2801                 :      12443 :     }
    2802         [ +  + ]:       4195 :     if (!s2n_cipher_preferences_equals(a->cipher_preferences, b->cipher_preferences)) {
    2803                 :       3852 :         return S2N_RESULT_OK;
    2804                 :       3852 :     }
    2805         [ +  + ]:        343 :     if (!s2n_kem_preferences_equals(a->kem_preferences, b->kem_preferences)) {
    2806                 :         90 :         return S2N_RESULT_OK;
    2807                 :         90 :     }
    2808         [ +  + ]:        253 :     if (!s2n_signature_preferences_equals(a->signature_preferences, b->signature_preferences)) {
    2809                 :         21 :         return S2N_RESULT_OK;
    2810                 :         21 :     }
    2811         [ -  + ]:        232 :     if (!s2n_signature_preferences_equals(a->certificate_signature_preferences,
    2812                 :        232 :                 b->certificate_signature_preferences)) {
    2813                 :          0 :         return S2N_RESULT_OK;
    2814                 :          0 :     }
    2815         [ +  + ]:        232 :     if (!s2n_ecc_preferences_equals(a->ecc_preferences, b->ecc_preferences)) {
    2816                 :          8 :         return S2N_RESULT_OK;
    2817                 :          8 :     }
    2818         [ -  + ]:        224 :     if (!s2n_supported_group_preferences_equals(a->strongly_preferred_groups, b->strongly_preferred_groups)) {
    2819                 :          0 :         return S2N_RESULT_OK;
    2820                 :          0 :     }
    2821         [ -  + ]:        224 :     if (!s2n_certificate_key_preferences_equals(a->certificate_key_preferences, b->certificate_key_preferences)) {
    2822                 :          0 :         return S2N_RESULT_OK;
    2823                 :          0 :     }
    2824                 :            : 
    2825                 :        224 :     *equal = true;
    2826                 :        224 :     return S2N_RESULT_OK;
    2827                 :        224 : }

Generated by: LCOV version 1.14