Skip to content

Commit c1c4e7c

Browse files
committed
Add signingName to AwsSigningAlgorithm class
1 parent 9c69efe commit c1c4e7c

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

runtime/auth/aws-signing-common/common/src/aws/smithy/kotlin/runtime/auth/awssigning/AwsSigningConfig.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,16 @@ public enum class AwsSigningAlgorithm {
2323
/**
2424
* AWS Signature Version 4 Asymmetric
2525
*/
26-
SIGV4_ASYMMETRIC,
26+
SIGV4_ASYMMETRIC;
27+
28+
/**
29+
* The name of this algorithm to use when signing requests.
30+
*/
31+
public val signingName: String
32+
get() = when (this) {
33+
SIGV4 -> "AWS4-HMAC-SHA256"
34+
SIGV4_ASYMMETRIC -> "AWS4-ECDSA-P256-SHA256"
35+
}
2736
}
2837

2938
/**

runtime/auth/aws-signing-default/common/src/aws/smithy/kotlin/runtime/auth/awssigning/BaseSigV4SignatureCalculator.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ internal abstract class BaseSigV4SignatureCalculator(
6161
}
6262
}
6363

64-
internal val AwsSigningAlgorithm.signingName: String
65-
get() = when (this) {
66-
AwsSigningAlgorithm.SIGV4 -> "AWS4-HMAC-SHA256"
67-
AwsSigningAlgorithm.SIGV4_ASYMMETRIC -> "AWS4-ECDSA-P256-SHA256"
68-
}
69-
7064
private const val HEADER_TIMESTAMP_TYPE: Byte = 8
7165

7266
/**

0 commit comments

Comments
 (0)