Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ParseHTTP (0.24 sec)

  1. internal/crypto/sse-c.go

    func (ssec) IsEncrypted(metadata map[string]string) bool {
    	if _, ok := metadata[MetaSealedKeySSEC]; ok {
    		return true
    	}
    	return false
    }
    
    // ParseHTTP parses the SSE-C headers and returns the SSE-C client key
    // on success. SSE-C copy headers are ignored.
    func (ssec) ParseHTTP(h http.Header) (key [32]byte, err error) {
    	if h.Get(xhttp.AmzServerSideEncryptionCustomerAlgorithm) != xhttp.AmzEncryptionAES {
    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)
  2. internal/crypto/header.go

    		return true
    	}
    	if _, ok := h[xhttp.AmzServerSideEncryptionCopyCustomerKeyMD5]; ok {
    		return true
    	}
    	return false
    }
    
    // ParseHTTP parses the SSE-C copy headers and returns the SSE-C client key
    // on success. Regular SSE-C headers are ignored.
    func (ssecCopy) ParseHTTP(h http.Header) (key [32]byte, err error) {
    	if h.Get(xhttp.AmzServerSideEncryptionCopyCustomerAlgorithm) != xhttp.AmzEncryptionAES {
    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)
  3. cmd/object-api-options.go

    			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)
    		if err != nil {
    			return
    		}
    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)
  4. internal/crypto/sse-kms.go

    		return strings.ToUpper(h.Get(xhttp.AmzServerSideEncryption)) != xhttp.AmzEncryptionAES
    	}
    	return false
    }
    
    // ParseHTTP parses the SSE-KMS headers and returns the SSE-KMS key ID
    // and the KMS context on success.
    func (ssekms) ParseHTTP(h http.Header) (string, kms.Context, error) {
    	if h == nil {
    		return "", nil, ErrInvalidEncryptionMethod
    	}
    
    	algorithm := h.Get(xhttp.AmzServerSideEncryption)
    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)
  5. cmd/encryption-v1.go

    	if crypto.S3.IsEncrypted(metadata) && crypto.SSECopy.IsRequested(h) {
    		return nil, crypto.ErrIncompatibleEncryptionMethod
    	}
    	k, err := crypto.SSECopy.ParseHTTP(h)
    	return k[:], err
    }
    
    // ParseSSECustomerRequest parses the SSE-C header fields of the provided request.
    // It returns the client provided key on success.
    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)
  6. internal/crypto/sse-s3.go

    	return ok && !strings.EqualFold(h.Get(xhttp.AmzServerSideEncryption), xhttp.AmzEncryptionKMS)
    }
    
    // ParseHTTP parses the SSE-S3 related HTTP headers and checks
    // whether they contain valid values.
    func (sses3) ParseHTTP(h http.Header) error {
    	if h.Get(xhttp.AmzServerSideEncryption) != xhttp.AmzEncryptionAES {
    		return ErrInvalidEncryptionMethod
    	}
    	return nil
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  7. internal/crypto/header_test.go

    	}, ShouldFail: true}, // 7
    
    }
    
    func TestKMSParseHTTP(t *testing.T) {
    	for i, test := range kmsParseHTTPTests {
    		_, _, err := S3KMS.ParseHTTP(test.Header)
    		if err == nil && test.ShouldFail {
    			t.Errorf("Test %d: should fail but succeeded", i)
    		}
    		if err != nil && !test.ShouldFail {
    			t.Errorf("Test %d: should pass but failed with: %v", i, err)
    		}
    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)
  8. internal/crypto/sse.go

    // and returns the decrypted object key.
    func (sse ssecCopy) UnsealObjectKey(h http.Header, metadata map[string]string, bucket, object string) (key ObjectKey, err error) {
    	clientKey, err := sse.ParseHTTP(h)
    	if err != nil {
    		return
    	}
    	return unsealObjectKey(clientKey[:], metadata, bucket, object)
    }
    
    // unsealObjectKey decrypts and returns the sealed object key
    // from the metadata using the SSE-C client 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)
  9. cmd/bucket-handlers.go

    			key, err = ParseSSECustomerHeader(formValues)
    			if err != nil {
    				writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    				return
    			}
    		case crypto.S3KMS:
    			keyID, kmsCtx, err = crypto.S3KMS.ParseHTTP(formValues)
    			if err != nil {
    				writeErrorResponse(ctx, w, toAPIError(ctx, err), 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)
  10. cmd/object-handlers.go

    		if err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    	if crypto.S3KMS.IsRequested(r.Header) {
    		newKeyID, kmsCtx, err = crypto.S3KMS.ParseHTTP(r.Header)
    		if err != nil {
    			writeErrorResponse(ctx, w, toAPIError(ctx, err), r.URL)
    			return
    		}
    	}
    
    	// If src == dst and either
    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)
Back to top