Skip to content

Commit

Permalink
Proper skew logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis committed Oct 6, 2023
1 parent 52c5d3b commit 3fd3f9f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ public class AwsHttpSigner(private val config: Config) : HttpSigner {
algorithm = config.algorithm

// apply clock skew if applicable
signingDate = (attributes.getOrNull(AwsSigningAttributes.SigningDate) ?: Instant.now()) +
(attributes.getOrNull(HttpOperationContext.ClockSkew) ?: Duration.ZERO)
signingDate = attributes.getOrNull(AwsSigningAttributes.SigningDate)
?: (Instant.now() + (attributes.getOrNull(HttpOperationContext.ClockSkew) ?: Duration.ZERO))


signatureType = config.signatureType
omitSessionToken = config.omitSessionToken
Expand Down

0 comments on commit 3fd3f9f

Please sign in to comment.