Skip to content

Commit 56da1d4

Browse files
authored
Merge pull request #2274 from adobe/dependabot/maven/aws-v2.version-2.30.34
Bump aws-v2.version from 2.29.29 to 2.30.34
2 parents 8f1221f + 735f7a5 commit 56da1d4

File tree

7 files changed

+36
-9
lines changed

7 files changed

+36
-9
lines changed

integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/S3TestBase.kt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 Adobe.
2+
* Copyright 2017-2025 Adobe.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -591,6 +591,7 @@ internal abstract class S3TestBase {
591591
ChecksumAlgorithm.SHA256 -> Algorithm.SHA256
592592
ChecksumAlgorithm.CRC32 -> Algorithm.CRC32
593593
ChecksumAlgorithm.CRC32_C -> Algorithm.CRC32C
594+
ChecksumAlgorithm.CRC64_NVME -> Algorithm.CRC64NVME
594595
else -> throw IllegalArgumentException("Unknown checksum algorithm")
595596
}
596597

@@ -639,11 +640,23 @@ internal abstract class S3TestBase {
639640
}
640641
}
641642

643+
fun S3Response.checksumCRC64NVME(): String? {
644+
return when (this) {
645+
is GetObjectResponse -> this.checksumCRC64NVME()
646+
is PutObjectResponse -> this.checksumCRC64NVME()
647+
is HeadObjectResponse -> this.checksumCRC64NVME()
648+
is UploadPartResponse -> this.checksumCRC64NVME()
649+
is GetObjectAttributesResponse -> this.checksum().checksumCRC64NVME()
650+
else -> throw RuntimeException("Unexpected response type ${this::class.java}")
651+
}
652+
}
653+
642654
return when (checksumAlgorithm) {
643655
ChecksumAlgorithm.SHA1 -> this.checksumSHA1()
644656
ChecksumAlgorithm.SHA256 -> this.checksumSHA256()
645657
ChecksumAlgorithm.CRC32 -> this.checksumCRC32()
646658
ChecksumAlgorithm.CRC32_C -> this.checksumCRC32C()
659+
ChecksumAlgorithm.CRC64_NVME -> this.checksumCRC64NVME()
647660
ChecksumAlgorithm.UNKNOWN_TO_SDK_VERSION -> "UNKNOWN_TO_SDK_VERSION"
648661
}
649662
}
@@ -696,6 +709,7 @@ internal abstract class S3TestBase {
696709
protected fun checksumAlgorithms(): Stream<ChecksumAlgorithm> {
697710
return ChecksumAlgorithm
698711
.entries
712+
.filter { it != ChecksumAlgorithm.CRC64_NVME }
699713
.filter { it != ChecksumAlgorithm.UNKNOWN_TO_SDK_VERSION }
700714
.map { it }
701715
.stream()

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</distributionManagement>
9090

9191
<properties>
92-
<aws-v2.version>2.29.29</aws-v2.version>
92+
<aws-v2.version>2.30.34</aws-v2.version>
9393

9494
<aws.version>1.12.782</aws.version>
9595
<checkstyle.version>10.21.2</checkstyle.version>

server/src/main/java/com/adobe/testing/s3mock/dto/ChecksumAlgorithm.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 Adobe.
2+
* Copyright 2017-2025 Adobe.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
2323
public enum ChecksumAlgorithm {
2424
CRC32("CRC32"),
2525
CRC32C("CRC32C"),
26+
CRC64NVME("CRC64NVME"),
2627
SHA1("SHA1"),
2728
SHA256("SHA256");
2829

@@ -39,6 +40,7 @@ public static ChecksumAlgorithm fromString(String value) {
3940
case "sha1", "SHA1" -> SHA1;
4041
case "crc32", "CRC32" -> CRC32;
4142
case "crc32c", "CRC32C" -> CRC32C;
43+
case "crc64nvme", "CRC64NVME" -> CRC64NVME;
4244
default -> null;
4345
};
4446
}
@@ -49,6 +51,7 @@ public static ChecksumAlgorithm fromHeader(String value) {
4951
case "x-amz-checksum-sha1" -> SHA1;
5052
case "x-amz-checksum-crc32" -> CRC32;
5153
case "x-amz-checksum-crc32c" -> CRC32C;
54+
case "x-amz-checksum-crc64nvme" -> CRC64NVME;
5255
default -> null;
5356
};
5457
}
@@ -57,6 +60,7 @@ public Algorithm toAlgorithm() {
5760
return switch (this) {
5861
case CRC32 -> Algorithm.CRC32;
5962
case CRC32C -> Algorithm.CRC32C;
63+
case CRC64NVME -> Algorithm.CRC64NVME;
6064
case SHA1 -> Algorithm.SHA1;
6165
case SHA256 -> Algorithm.SHA256;
6266
};

server/src/main/java/com/adobe/testing/s3mock/util/AwsHttpHeaders.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 Adobe.
2+
* Copyright 2017-2025 Adobe.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -60,6 +60,7 @@ public final class AwsHttpHeaders {
6060
public static final String X_AMZ_CHECKSUM = "x-amz-checksum";
6161
public static final String X_AMZ_CHECKSUM_CRC32 = "x-amz-checksum-crc32";
6262
public static final String X_AMZ_CHECKSUM_CRC32C = "x-amz-checksum-crc32c";
63+
public static final String X_AMZ_CHECKSUM_CRC64NVME = "x-amz-checksum-crc64nvme";
6364
public static final String X_AMZ_CHECKSUM_SHA1 = "x-amz-checksum-sha1";
6465
public static final String X_AMZ_CHECKSUM_SHA256 = "x-amz-checksum-sha256";
6566
public static final String X_AMZ_STORAGE_CLASS = "x-amz-storage-class";

server/src/main/java/com/adobe/testing/s3mock/util/HeaderUtil.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 Adobe.
2+
* Copyright 2017-2025 Adobe.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
2020
import static com.adobe.testing.s3mock.util.AwsHttpHeaders.X_AMZ_CHECKSUM_ALGORITHM;
2121
import static com.adobe.testing.s3mock.util.AwsHttpHeaders.X_AMZ_CHECKSUM_CRC32;
2222
import static com.adobe.testing.s3mock.util.AwsHttpHeaders.X_AMZ_CHECKSUM_CRC32C;
23+
import static com.adobe.testing.s3mock.util.AwsHttpHeaders.X_AMZ_CHECKSUM_CRC64NVME;
2324
import static com.adobe.testing.s3mock.util.AwsHttpHeaders.X_AMZ_CHECKSUM_SHA1;
2425
import static com.adobe.testing.s3mock.util.AwsHttpHeaders.X_AMZ_CHECKSUM_SHA256;
2526
import static com.adobe.testing.s3mock.util.AwsHttpHeaders.X_AMZ_CONTENT_SHA256;
@@ -239,6 +240,8 @@ public static String checksumFrom(HttpHeaders headers) {
239240
return headers.getFirst(X_AMZ_CHECKSUM_CRC32);
240241
} else if (headers.containsKey(X_AMZ_CHECKSUM_CRC32C)) {
241242
return headers.getFirst(X_AMZ_CHECKSUM_CRC32C);
243+
} else if (headers.containsKey(X_AMZ_CHECKSUM_CRC64NVME)) {
244+
return headers.getFirst(X_AMZ_CHECKSUM_CRC64NVME);
242245
}
243246
return null;
244247
}
@@ -249,6 +252,7 @@ public static String mapChecksumToHeader(ChecksumAlgorithm checksumAlgorithm) {
249252
case SHA1 -> X_AMZ_CHECKSUM_SHA1;
250253
case CRC32 -> X_AMZ_CHECKSUM_CRC32;
251254
case CRC32C -> X_AMZ_CHECKSUM_CRC32C;
255+
case CRC64NVME -> X_AMZ_CHECKSUM_CRC64NVME;
252256
};
253257
}
254258

server/src/test/kotlin/com/adobe/testing/s3mock/util/AwsChunkedDecodingChecksumInputStreamTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 Adobe.
2+
* Copyright 2017-2025 Adobe.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -184,7 +184,9 @@ internal class AwsChunkedDecodingChecksumInputStreamTest {
184184
companion object {
185185
@JvmStatic
186186
private fun algorithms(): Stream<Algorithm> {
187-
return Algorithm.entries.toList().stream()
187+
//ignore new CRC64NVME for now, looks like AWS is moving checksums from core to a new checksums module, but not all
188+
//types are currently compatible with the new types.
189+
return Algorithm.entries.toList().stream().filter { it != Algorithm.CRC64NVME }
188190
}
189191
}
190192
}

server/src/test/kotlin/com/adobe/testing/s3mock/util/AwsUnsignedChunkedDecodingChecksumInputStreamTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 Adobe.
2+
* Copyright 2017-2025 Adobe.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -170,7 +170,9 @@ internal class AwsUnsignedChunkedDecodingChecksumInputStreamTest {
170170
companion object {
171171
@JvmStatic
172172
private fun algorithms(): Stream<Algorithm> {
173-
return stream(Algorithm.entries.toTypedArray())
173+
//ignore new CRC64NVME for now, looks like AWS is moving checksums from core to a new checksums module, but not all
174+
//types are currently compatible with the new types.
175+
return stream(Algorithm.entries.toTypedArray()).filter { it != Algorithm.CRC64NVME }
174176
}
175177
}
176178
}

0 commit comments

Comments
 (0)