Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed May 13, 2024
1 parent 0b50891 commit e61128a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ if (LEGACY_BUILD)
option(BUILD_OPTEL_OTLP_BENCHMARKS "Enables building the benchmark tests with open telemetry OTLP clients" OFF)
option(USE_TLS_V1_2 "Set http client to enforce TLS 1.2" ON)
option(USE_TLS_V1_3 "Set http client to enforce TLS 1.3" OFF)
option(USE_OPENSSL "Set this if you want to use your system's OpenSSL 1.0.2/1.1.1 compatible libcrypto" ON)

set(AWS_USER_AGENT_CUSTOMIZATION "" CACHE STRING "User agent extension")
set(AWS_TEST_REGION "US_EAST_1" CACHE STRING "Region to target integration tests against")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ namespace Aws
{
namespace Crypto
{
class AWS_CORE_API CRT_SHA256HMAC : public HMAC
class AWS_CORE_API CRTSha256Hmac : public HMAC
{
public:
HashResult Calculate(const Aws::Utils::ByteBuffer& toSign, const Aws::Utils::ByteBuffer& secret) override;

// @private but made public for the sake of make_shared.
CRT_SHA256HMAC() = default;
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/aws-cpp-sdk-core/source/utils/crypto/CryptoBuf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ namespace Aws
index += cryptoBuffer.GetLength();
}

if (cryptoBuffer.GetLength())
if (cryptoBuffer.GetLength() && m_cipher)
{
CryptoBuffer putBackArea(m_putBack);

Expand Down
2 changes: 1 addition & 1 deletion src/aws-cpp-sdk-core/source/utils/crypto/crt/CRTHMAC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Aws
namespace Crypto
{

HashResult CRT_SHA256HMAC::Calculate(const Aws::Utils::ByteBuffer &toSign, const Aws::Utils::ByteBuffer &secret)
HashResult CRTSha256Hmac::Calculate(const Aws::Utils::ByteBuffer &toSign, const Aws::Utils::ByteBuffer &secret)
{
auto toSignCur = Crt::ByteCursorFromArray(toSign.GetUnderlyingData(), toSign.GetLength());
auto secretCur = Crt::ByteCursorFromArray(secret.GetUnderlyingData(), secret.GetLength());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class DefaultSHA256HmacFactory : public HMACFactory
std::shared_ptr<Aws::Utils::Crypto::HMAC> CreateImplementation() const override
{
#ifndef NO_ENCRYPTION
return Aws::MakeShared<CRT_SHA256HMAC>(s_allocationTag);
return Aws::MakeShared<CRTSha256Hmac>(s_allocationTag);
#else
return nullptr;
#endif
Expand Down

0 comments on commit e61128a

Please sign in to comment.