Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for doesPolicySignatureMatch (0.41 sec)

  1. cmd/signature-v4.go

    func getSignature(signingKey []byte, stringToSign string) string {
    	return hex.EncodeToString(sumHMAC(signingKey, []byte(stringToSign)))
    }
    
    // Check to see if Policy is signed correctly.
    func doesPolicySignatureMatch(formValues http.Header) (auth.Credentials, APIErrorCode) {
    	// For SignV2 - Signature field will be valid
    	if _, ok := formValues[xhttp.AmzSignatureV2]; ok {
    		return doesPolicySignatureV2Match(formValues)
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 16:45:54 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  2. cmd/signature-v4_test.go

    				},
    				"Policy": []string{"policy"},
    			},
    			expected: ErrNone,
    		},
    	}
    
    	// Run each test case individually.
    	for i, testCase := range testCases {
    		_, code := doesPolicySignatureMatch(testCase.form)
    		if code != testCase.expected {
    			t.Errorf("(%d) expected to get %s, instead got %s", i, niceError(testCase.expected), niceError(code))
    		}
    	}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 10.4K bytes
    - Viewed (1)
  3. cmd/bucket-handlers.go

    		if err != nil {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMalformedPOSTRequest), r.URL)
    			return
    		}
    	}
    
    	// Verify policy signature.
    	cred, errCode := doesPolicySignatureMatch(formValues)
    	if errCode != ErrNone {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(errCode), r.URL)
    		return
    	}
    
    	if len(fanOutEntries) > 0 {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 61.6K bytes
    - Viewed (0)
Back to top