feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/s3-encryption/CryptoConfiguration.h>
namespace Aws
{
namespace S3Encryption
{
CryptoConfiguration::CryptoConfiguration() :
m_storageMethod(StorageMethod::METADATA),
m_cryptoMode(CryptoMode::AUTHENTICATED_ENCRYPTION),
m_unAuthenticatedRangeGet(RangeGetMode::ALL),
m_securityProfile(SecurityProfile::V2_AND_LEGACY)
{
}
CryptoConfiguration::CryptoConfiguration(StorageMethod storageMethod) :
m_storageMethod(storageMethod),
m_cryptoMode(CryptoMode::AUTHENTICATED_ENCRYPTION),
m_unAuthenticatedRangeGet(RangeGetMode::ALL),
m_securityProfile(SecurityProfile::V2_AND_LEGACY)
{
}
CryptoConfiguration::CryptoConfiguration(CryptoMode cryptoMode) :
m_storageMethod(StorageMethod::METADATA),
m_cryptoMode(cryptoMode),
m_unAuthenticatedRangeGet(RangeGetMode::ALL),
m_securityProfile(SecurityProfile::V2_AND_LEGACY)
{
}
CryptoConfiguration::CryptoConfiguration(StorageMethod storageMode, CryptoMode cryptoMode) :
m_storageMethod(storageMode),
m_cryptoMode(cryptoMode),
m_unAuthenticatedRangeGet(RangeGetMode::ALL),
m_securityProfile(SecurityProfile::V2_AND_LEGACY)
{
}
CryptoConfigurationV2::CryptoConfigurationV2(const std::shared_ptr<Aws::S3Encryption::Materials::KMSWithContextEncryptionMaterials>& materials) :
m_storageMethod(StorageMethod::METADATA),
m_unAuthenticatedRangeGet(RangeGetMode::DISABLED),
m_securityProfile(SecurityProfile::V2),
m_encryptionMaterials(materials)
{
}
CryptoConfigurationV2::CryptoConfigurationV2(const std::shared_ptr<Aws::S3Encryption::Materials::SimpleEncryptionMaterialsWithGCMAAD>& materials) :
m_storageMethod(StorageMethod::METADATA),
m_unAuthenticatedRangeGet(RangeGetMode::DISABLED),
m_securityProfile(SecurityProfile::V2),
m_encryptionMaterials(materials)
{
}
}
}