Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for IsRequested (0.19 sec)

  1. internal/crypto/sse.go

    	case S3KMS.IsRequested(h):
    		return S3KMS, true
    	case SSEC.IsRequested(h):
    		return SSEC, true
    	default:
    		return nil, false
    	}
    }
    
    // Requested returns whether any type of encryption is requested.
    func Requested(h http.Header) bool {
    	return S3.IsRequested(h) || S3KMS.IsRequested(h) || SSEC.IsRequested(h)
    }
    
    // UnsealObjectKey extracts and decrypts the sealed object key
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 4.4K bytes
    - Viewed (0)
  2. cmd/object-multipart-handlers.go

    		if crypto.SSECopy.IsRequested(r.Header) {
    			writeErrorResponse(ctx, w, toAPIError(ctx, errInvalidEncryptionParameters), r.URL)
    			return
    		}
    
    		if crypto.SSEC.IsRequested(r.Header) && crypto.S3.IsRequested(r.Header) {
    			writeErrorResponse(ctx, w, toAPIError(ctx, crypto.ErrIncompatibleEncryptionMethod), r.URL)
    			return
    		}
    
    		if crypto.SSEC.IsRequested(r.Header) && crypto.S3KMS.IsRequested(r.Header) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  3. cmd/encryption-v1.go

    		if crypto.SSEC.IsEncrypted(info.UserDefined) {
    			if !(crypto.SSEC.IsRequested(headers) || crypto.SSECopy.IsRequested(headers)) {
    				return encrypted, errEncryptedObject
    			}
    		}
    
    		if crypto.S3.IsEncrypted(info.UserDefined) && r.Header.Get(xhttp.AmzCopySource) == "" {
    			if crypto.SSEC.IsRequested(headers) || crypto.SSECopy.IsRequested(headers) {
    				return encrypted, errEncryptedObject
    			}
    		}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 36.5K bytes
    - Viewed (0)
  4. internal/crypto/header_test.go

    )
    
    func TestIsRequested(t *testing.T) {
    	for i, test := range kmsIsRequestedTests {
    		_, got := IsRequested(test.Header)
    		if Requested(test.Header) != got {
    			// Test if result matches.
    			t.Errorf("Requested mismatch, want %v, got %v", Requested(test.Header), got)
    		}
    		got = got && S3KMS.IsRequested(test.Header)
    		if got != test.Expected {
    			t.Errorf("SSE-KMS: Test %d: Wanted %v but got %v", i, test.Expected, got)
    		}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Jul 13 14:52:15 GMT 2022
    - 21.4K bytes
    - Viewed (0)
  5. cmd/object-api-options.go

    	if copySource {
    		if crypto.SSECopy.IsRequested(header) {
    			clientKey, err = crypto.SSECopy.ParseHTTP(header)
    			if err != nil {
    				return
    			}
    			if sse, err = encrypt.NewSSEC(clientKey[:]); err != nil {
    				return
    			}
    			opts.ServerSideEncryption = encrypt.SSECopy(sse)
    			return
    		}
    		return
    	}
    
    	if crypto.SSEC.IsRequested(header) {
    		clientKey, err = crypto.SSEC.ParseHTTP(header)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Apr 20 09:05:54 GMT 2024
    - 14.2K bytes
    - Viewed (0)
  6. internal/crypto/header.go

    // functionality to handle SSE-C copy requests.
    var SSECopy = ssecCopy{}
    
    type ssecCopy struct{}
    
    // IsRequested returns true if the HTTP headers contains
    // at least one SSE-C copy header. Regular SSE-C headers
    // are ignored.
    func (ssecCopy) IsRequested(h http.Header) bool {
    	if _, ok := h[xhttp.AmzServerSideEncryptionCopyCustomerAlgorithm]; ok {
    		return true
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  7. cmd/s3-zip-handlers.go

    func (api objectAPIHandlers) getObjectInArchiveFileHandler(ctx context.Context, objectAPI ObjectLayer, bucket, object string, w http.ResponseWriter, r *http.Request) {
    	if crypto.S3.IsRequested(r.Header) || crypto.S3KMS.IsRequested(r.Header) { // If SSE-S3 or SSE-KMS present -> AWS fails with undefined error
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrBadRequest), r.URL)
    		return
    	}
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 09 10:41:25 GMT 2024
    - 15.8K bytes
    - Viewed (0)
  8. internal/crypto/sse-c.go

    )
    
    // String returns the SSE domain as string. For SSE-C the
    // domain is "SSE-C".
    func (ssec) String() string { return "SSE-C" }
    
    // IsRequested returns true if the HTTP headers contains
    // at least one SSE-C header. SSE-C copy headers are ignored.
    func (ssec) IsRequested(h http.Header) bool {
    	if _, ok := h[xhttp.AmzServerSideEncryptionCustomerAlgorithm]; ok {
    		return true
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  9. cmd/object-handlers.go

    	sseCopyS3 := crypto.S3.IsEncrypted(srcInfo.UserDefined)
    	sseCopyC := crypto.SSEC.IsEncrypted(srcInfo.UserDefined) && crypto.SSECopy.IsRequested(r.Header)
    	sseC := crypto.SSEC.IsRequested(r.Header)
    	sseS3 := crypto.S3.IsRequested(r.Header)
    	sseKMS := crypto.S3KMS.IsRequested(r.Header)
    
    	isSourceEncrypted := sseCopyC || sseCopyS3 || sseCopyKMS
    	isTargetEncrypted := sseC || sseS3 || sseKMS
    
    	if sseC {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 05 11:39:31 GMT 2024
    - 124.7K bytes
    - Viewed (0)
  10. internal/crypto/sse-kms.go

    	_ Type = S3KMS
    )
    
    // String returns the SSE domain as string. For SSE-KMS the
    // domain is "SSE-KMS".
    func (ssekms) String() string { return "SSE-KMS" }
    
    // IsRequested returns true if the HTTP headers contains
    // at least one SSE-KMS header.
    func (ssekms) IsRequested(h http.Header) bool {
    	if _, ok := h[xhttp.AmzServerSideEncryptionKmsID]; ok {
    		return true
    	}
    	if _, ok := h[xhttp.AmzServerSideEncryptionKmsContext]; ok {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top