Skip to content

Commit

Permalink
Add PQ_DEFAULT enum to aws_tls_cipher_pref (#707)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexw91 authored Feb 11, 2025
1 parent 3041dab commit b1774b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/aws/io/tls_channel_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ enum aws_tls_cipher_pref {
*/
AWS_IO_TLS_CIPHER_PREF_PQ_TLSV1_2_2024_10 = 7,

/* Recommended default policy with post-quantum algorithm support. This policy may change over time. */
AWS_IO_TLS_CIPHER_PREF_PQ_DEFAULT = 8,

AWS_IO_TLS_CIPHER_PREF_END_RANGE = 0xFFFF
};

Expand Down
6 changes: 6 additions & 0 deletions source/s2n/s2n_tls_channel_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ bool aws_tls_is_cipher_pref_supported(enum aws_tls_cipher_pref cipher_pref) {
return true;
case AWS_IO_TLS_CIPHER_PREF_PQ_TLSV1_2_2024_10:
return true;
case AWS_IO_TLS_CIPHER_PREF_PQ_DEFAULT:
return true;
#endif

default:
Expand Down Expand Up @@ -1535,6 +1537,10 @@ static struct aws_tls_ctx *s_tls_ctx_new(
/* No-Op, if the user configured a minimum_tls_version then a version-specific Cipher Preference was set
*/
break;
case AWS_IO_TLS_CIPHER_PREF_PQ_DEFAULT:
/* The specific PQ policy used here may change over time. */
security_policy = "AWS-CRT-SDK-TLSv1.2-2023-PQ";
break;
case AWS_IO_TLS_CIPHER_PREF_PQ_TLSv1_0_2021_05:
security_policy = "PQ-TLS-1-0-2021-05-26";
break;
Expand Down

0 comments on commit b1774b6

Please sign in to comment.