@@ -66,6 +66,14 @@ namespace Aws
6666 S3EncryptionClientBase (const std::shared_ptr<Aws::Utils::Crypto::EncryptionMaterials>& encryptionMaterials, const Aws::S3Encryption::CryptoConfiguration& cryptoConfig,
6767 const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
6868
69+ /*
70+ * Initialize the S3EncryptionClientBase with encryption materials, crypto configuration, and a s3 client factory.
71+ * The factory will be used to create the underlying S3 Client.
72+ */
73+ S3EncryptionClientBase (const std::shared_ptr<Aws::Utils::Crypto::EncryptionMaterials>& encryptionMaterials,
74+ const Aws::S3Encryption::CryptoConfiguration& cryptoConfig,
75+ const std::function<Aws::UniquePtr<Aws::S3::S3Client> ()>& s3ClientFactory);
76+
6977 S3EncryptionClientBase (const S3EncryptionClientBase&) = delete ;
7078 S3EncryptionClientBase& operator =(const S3EncryptionClientBase&) = delete ;
7179
@@ -180,6 +188,17 @@ namespace Aws
180188 Init (cryptoConfig);
181189 }
182190
191+ /*
192+ * Initialize the S3 Encryption Client V2 with crypto configuration v2, and a s3 client factory.
193+ * The factory will be used to create the underlying S3 Client.
194+ */
195+ S3EncryptionClientV2 (const Aws::S3Encryption::CryptoConfigurationV2& cryptoConfig,
196+ const std::function<Aws::UniquePtr<Aws::S3::S3Client> ()>& s3ClientFactory)
197+ : S3EncryptionClientBase(cryptoConfig.GetEncryptionMaterials(), CryptoConfiguration(), s3ClientFactory)
198+ {
199+ Init (cryptoConfig);
200+ }
201+
183202 S3EncryptionClientV2 (const S3EncryptionClientV2&) = delete ;
184203 S3EncryptionClientV2& operator =(const S3EncryptionClientV2&) = delete ;
185204
0 commit comments