Skip to content

Commit 8b95fc4

Browse files
committed
Merge branch 'main' of github.com:awslabs/aws-crt-kotlin into kn-main
2 parents 0e1aae3 + a8f6051 commit 8b95fc4

File tree

15 files changed

+125
-91
lines changed

15 files changed

+125
-91
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"id": "aa10152c-0040-46b3-8551-ed63aca0c6ee",
3+
"type": "bugfix",
4+
"description": "Enable building this project on JDK21 by setting -Xjdk-release flag",
5+
"issues": [
6+
"https://github.com/smithy-lang/smithy-kotlin/issues/1295"
7+
]
8+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: API compatibility verification
2+
3+
on:
4+
pull_request:
5+
types: [ opened, synchronize, reopened, labeled, unlabeled ]
6+
branches:
7+
- main
8+
- '*-main'
9+
10+
jobs:
11+
api-compat-verification:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Check for API compatibility
16+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-api-break') }}
17+
run: |
18+
git fetch origin ${{ github.base_ref }} --depth 1 && \
19+
git diff remotes/origin/${{ github.base_ref }} --numstat "*.api" | awk '
20+
BEGIN { s = 0 }
21+
22+
# git diff numstat shows lines deleted in field 2, hence sum up field 2 across all items
23+
{ s += $2 }
24+
25+
# exit with the number of lines deleted as the result code so that `if failure()` works below
26+
END { exit s }
27+
'
28+
- name: Error message
29+
if: ${{ failure() }}
30+
run: |
31+
echo "::error ::This change modifies the public API in a way that may be backwards-incompatible. Carefully review this pull request and either:"
32+
echo "::error ::* Revert the changes which caused the API incompatibility –or–"
33+
echo "::error ::* Add the 'acknowledge-api-break' label to this PR (in rare cases warranting an API breakage)"
34+
exit 1

.github/workflows/artifact-size-metrics.yml

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
with:
2626
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
2727
aws-region: us-west-2
28+
- name: Configure Gradle
29+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
2830
- name: Generate Artifact Size Metrics
2931
run: ./gradlew artifactSizeMetrics
3032
- name: Save Artifact Size Metrics
@@ -42,60 +44,15 @@ jobs:
4244
with:
4345
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
4446
aws-region: us-west-2
47+
- name: Configure Gradle
48+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
4549
- name: Generate Artifact Size Metrics
4650
run: ./gradlew -Paws.kotlin.native=false artifactSizeMetrics
4751
- name: Analyze Artifact Size Metrics
4852
run: ./gradlew analyzeArtifactSizeMetrics
49-
- name: Show Results
50-
uses: actions/github-script@v7
51-
with:
52-
script: |
53-
const getComments =
54-
`query {
55-
repository(owner:"${context.repo.owner}", name:"${context.repo.repo}"){
56-
pullRequest(number: ${context.issue.number}) {
57-
id
58-
comments(last:100) {
59-
nodes {
60-
id
61-
body
62-
author {
63-
login
64-
}
65-
isMinimized
66-
}
67-
}
68-
}
69-
}
70-
}`
71-
72-
const response = await github.graphql(getComments)
73-
const comments = response.repository.pullRequest.comments.nodes
74-
75-
const mutations = comments
76-
.filter(comment => comment.author.login == 'github-actions' && !comment.isMinimized && comment.body.startsWith('Affected Artifacts'))
77-
.map(comment =>
78-
github.graphql(
79-
`mutation {
80-
minimizeComment(input:{subjectId:"${comment.id}", classifier:OUTDATED}){
81-
clientMutationId
82-
}
83-
}`
84-
)
85-
)
86-
await Promise.all(mutations)
8753

88-
const fs = require('node:fs')
89-
const comment = fs.readFileSync('build/reports/metrics/artifact-analysis.md', 'utf8')
90-
91-
const writeComment =
92-
`mutation {
93-
addComment(input:{body:"""${comment}""", subjectId:"${response.repository.pullRequest.id}"}){
94-
clientMutationId
95-
}
96-
}`
97-
98-
await github.graphql(writeComment)
54+
- name: Show Results
55+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/artifact-size-metrics/show-results@main
9956

10057
- name: Evaluate
10158
if: ${{ !contains(github.event.pull_request.labels.*.name, 'acknowledge-artifact-size-increase') }}
Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Changelog verification
22

3+
permissions:
4+
id-token: write
5+
36
on:
47
pull_request:
58
types: [ opened, synchronize, reopened, labeled, unlabeled ]
@@ -11,16 +14,11 @@ jobs:
1114
changelog-verification:
1215
runs-on: ubuntu-latest
1316
steps:
14-
- uses: actions/checkout@v2
15-
- name: Check for changelog entry
16-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-changelog') }}
17-
run: |
18-
git fetch origin ${{ github.base_ref }} --depth 1 && \
19-
git diff remotes/origin/${{ github.base_ref }} --name-only | grep -P "\.changes/[0-9a-f-]+\.json"
20-
- name: Error message
21-
if: ${{ failure() }}
22-
run: |
23-
echo "::error ::No new/updated changelog entry found in /.changes directory. Please either:"
24-
echo "::error ::* Add a changelog entry (see CONTRIBUTING.md for instructions) –or–"
25-
echo "::error ::* Add the 'no-changelog' label to this PR (in rare cases not warranting a changelog entry)"
26-
exit 1
17+
- name: Configure AWS Credentials
18+
uses: aws-actions/configure-aws-credentials@v4
19+
with:
20+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
21+
aws-region: us-west-2
22+
23+
- name: Verify changelog
24+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/changelog-verification@main

.github/workflows/ci.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ jobs:
2828
steps:
2929
- name: Checkout sources
3030
uses: actions/checkout@v4
31+
32+
- name: Configure JDK
33+
uses: actions/setup-java@v3
34+
with:
35+
distribution: 'corretto'
36+
java-version: 17
37+
cache: 'gradle'
38+
3139
- name: Setup build environment
3240
uses: ./.github/actions/setup-build
3341
- name: Test with ${{ matrix.java-version }}

.github/workflows/kat-transform.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ jobs:
4545
java-version: 17
4646
cache: 'gradle'
4747

48+
- name: Configure Gradle
49+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/configure-gradle@main
50+
with:
51+
working-directory: ./aws-crt-kotlin
52+
4853
- name: Build
4954
working-directory: ./aws-crt-kotlin
5055
shell: bash

.github/workflows/merge-main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Merge main
2+
on:
3+
push:
4+
branches: [ main ]
5+
workflow_dispatch:
6+
7+
jobs:
8+
merge:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Merge main
12+
uses: awslabs/aws-kotlin-repo-tools/.github/actions/merge-main@main
13+
with:
14+
ci-user-pat: ${{ secrets.CI_USER_PAT }}
15+
exempt-branches: # Add any if required

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## [0.9.2] - 06/18/2025
4+
5+
### Fixes
6+
* Update the set of supported `TlsCipherPreference` values to reflect the latest capabilities/support from CRT
7+
38
## [0.9.1] - 01/28/2025
49

510
### Fixes

aws-crt-kotlin/api/aws-crt-kotlin.api

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,8 @@ public final class aws/sdk/kotlin/crt/io/TlsCipherPreference : java/lang/Enum {
821821
public static final field KMS_PQ_TLS_V1_0_2019_06 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
822822
public static final field KMS_PQ_TLS_V1_0_2020_02 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
823823
public static final field KMS_PQ_TLS_V1_0_2020_07 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
824+
public static final field PQ_DEFAULT Laws/sdk/kotlin/crt/io/TlsCipherPreference;
825+
public static final field PQ_TLSV1_2_2024_10 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
824826
public static final field PQ_TLS_V1_0_2021_05 Laws/sdk/kotlin/crt/io/TlsCipherPreference;
825827
public static final field SYSTEM_DEFAULT Laws/sdk/kotlin/crt/io/TlsCipherPreference;
826828
public static fun getEntries ()Lkotlin/enums/EnumEntries;

aws-crt-kotlin/common/src/aws/sdk/kotlin/crt/io/TlsCipherPreference.kt

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,54 +19,53 @@ public enum class TlsCipherPreference(public val value: Int) {
1919
SYSTEM_DEFAULT(0),
2020

2121
/**
22-
* This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.
22+
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
2323
*/
24-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.")
24+
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
2525
KMS_PQ_TLS_V1_0_2019_06(1),
2626

2727
/**
28-
* This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.
28+
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
2929
*/
30-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.")
30+
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
3131
KMS_PQ_SIKE_TLS_V1_0_2019_11(2),
3232

3333
/**
34-
* This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.
34+
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
3535
*/
36-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.")
36+
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
3737
KMS_PQ_TLS_V1_0_2020_02(3),
3838

3939
/**
40-
* This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.
40+
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
4141
*/
42-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.")
42+
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
4343
KMS_PQ_SIKE_TLS_V1_0_2020_02(4),
4444

4545
/**
46-
* This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.
46+
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
4747
*/
48-
@Deprecated("This cipher preference is no longer supported. Use PQ_TLS_V1_0_2021_05 instead.")
48+
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
4949
KMS_PQ_TLS_V1_0_2020_07(5),
5050

5151
/**
52-
* This TlsCipherPreference supports TLS 1.0 through TLS 1.3, and contains Kyber Round 3 as its highest priority
53-
* PQ algorithm. PQ algorithms in this preference list will be used in hybrid mode, and will be combined with a
54-
* classical ECDHE key exchange.
55-
*
56-
* NIST has announced that Kyber will be first post-quantum key-agreement algorithm that it will standardize.
57-
* However, the NIST standardization process might introduce minor changes that may cause the final Kyber standard
58-
* to differ from the Kyber Round 3 implementation available in this preference list.
59-
*
60-
* Since this TlsCipherPreference contains algorithms that have not yet been officially standardized by NIST, this
61-
* preference list, and any of the PQ algorithms in it, may stop being supported at any time.
62-
*
63-
* For more info see:
64-
* - https://tools.ietf.org/html/draft-campagna-tls-bike-sike-hybrid
65-
* - https://datatracker.ietf.org/doc/html/draft-ietf-tls-hybrid-design
66-
* - https://aws.amazon.com/blogs/security/how-to-tune-tls-for-hybrid-post-quantum-cryptography-with-kyber/
67-
* - https://nvlpubs.nist.gov/nistpubs/ir/2022/NIST.IR.8413.pdf
52+
* This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.
6853
*/
54+
@Deprecated("This cipher preference is no longer supported. Use PQ_TLSV1_2_2024_10 instead.")
6955
PQ_TLS_V1_0_2021_05(6),
56+
57+
/**
58+
* This TLS cipher preference list contains post-quantum key exchange algorithms that have been standardized by
59+
* NIST. PQ algorithms in this preference list will be used in hybrid mode, and always combined with a classical
60+
* ECDHE key exchange.
61+
*/
62+
PQ_TLSV1_2_2024_10(7),
63+
64+
/**
65+
* Recommended default policy with post-quantum algorithm support. This policy may change over time.
66+
*/
67+
PQ_DEFAULT(8),
68+
7069
;
7170

7271
/**

0 commit comments

Comments
 (0)