INNER CODE UNIT · Go

verifyAWSPair

cc1a2b/JShunter · internal/jshunter/aws_pair.go:84

func verifyAWSPair(ctx context.Context, client *http.Client, p AWSPair) VerifyResult {
	body := "Action=GetCallerIdentity&Version=2011-06-15"
	now := time.Now().UTC()
	dateStr := now.Format("20060102")
	timeStr := now.Format("20060102T150405Z")

	bodyHash := sha256Hex([]byte(body))
	canonicalReq := strings.Join([]string{
		"POST",
		"/",
		"",
		"content-type:application/x-www-form-urlencoded; charset=utf-8",
		"host:" + awsHost,
		"x-amz-content-sha256:" + bodyHash,
		"x-amz-date:" + timeStr,
		"",
		"content-type;host;x-amz-content-sha256;x-amz-date",
		bodyHash,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…