Skip to content

Commit

Permalink
according to aws/aws-sdk-cpp@7989e6f, CompleteMultipartUploadRequest …
Browse files Browse the repository at this point in the history
…add the SSEC related function after 1.9.201
  • Loading branch information
Hang Zheng committed Oct 8, 2024
1 parent b29ab6a commit 44d759a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/src/arrow/filesystem/s3_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ Status SetSSECustomerKey(S3RequestType& request, const std::string& sse_customer
if (sse_customer_key.empty()) {
return Status::OK(); // do nothing if the sse_customer_key is not configured
}
#ifndef ARROW_S3_SUPPORT_SSEC
return Status::NotImplemented("SSE-C is not supported");
#endif
ARROW_ASSIGN_OR_RAISE(auto md5, internal::CalculateSSECustomerKeyMD5(sse_customer_key));
request.SetSSECustomerKeyMD5(md5);
request.SetSSECustomerKey(arrow::util::base64_encode(sse_customer_key));
Expand Down
4 changes: 4 additions & 0 deletions cpp/src/arrow/filesystem/s3fs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@
# define ARROW_S3_HAS_S3CLIENT_CONFIGURATION
#endif

#if ARROW_AWS_SDK_VERSION_CHECK(1, 9, 201)
# define ARROW_S3_SUPPORT_SSEC
#endif

#ifdef ARROW_S3_HAS_CRT
# include <aws/crt/io/Bootstrap.h>
# include <aws/crt/io/EventLoopGroup.h>
Expand Down

0 comments on commit 44d759a

Please sign in to comment.