allow aws_http to use static signing time

This commit is contained in:
Emil Lerch 2023-09-08 21:41:08 -07:00
parent fd0e80f00c
commit 037fb7f1ae
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -39,6 +39,9 @@ pub const Options = struct {
region: []const u8 = "aws-global",
dualstack: bool = false,
sigv4_service_name: ?[]const u8 = null,
/// Used for testing to provide consistent signing. If null, will use current time
signing_time: ?i64 = null,
};
pub const Header = base.Header;
@ -110,6 +113,7 @@ pub const AwsHttp = struct {
.region = getRegion(service, options.region),
.service = options.sigv4_service_name orelse service,
.credentials = creds,
.signing_time = options.signing_time,
};
return try self.makeRequest(endpoint, request, signing_config);
}