Skip to content

Commit

Permalink
Merge branch 'master' into feature/add-ota-for-pump-controller-app
Browse files Browse the repository at this point in the history
  • Loading branch information
tlykkeberg-grundfos committed Mar 2, 2022
2 parents 14f0843 + c8bd017 commit 172f9eb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ chip_gn_arg_append("esp32_cxx" "\"${CMAKE_CXX_COMPILER}\"")
chip_gn_arg_append("esp32_cpu" "\"esp32\"")
chip_gn_arg_bool("is_debug" ${is_debug})

if(CONFIG_BT_ENABLED)
if(CONFIG_ENABLE_CHIPOBLE)
chip_gn_arg_append("chip_config_network_layer_ble" "true")
else()
chip_gn_arg_append("chip_config_network_layer_ble" "false")
Expand Down
4 changes: 2 additions & 2 deletions src/crypto/CHIPCryptoPAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ CHIP_ERROR Spake2p_P256_SHA256_HKDF_HMAC::ComputeW0(uint8_t * w0out, size_t * w0
return CHIP_NO_ERROR;
}

CHIP_ERROR Spake2pVerifier::Serialize(MutableByteSpan & outSerialized)
CHIP_ERROR Spake2pVerifier::Serialize(MutableByteSpan & outSerialized) const
{
VerifyOrReturnError(outSerialized.size() >= kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INVALID_ARGUMENT);

Expand All @@ -527,7 +527,7 @@ CHIP_ERROR Spake2pVerifier::Serialize(MutableByteSpan & outSerialized)
return CHIP_NO_ERROR;
}

CHIP_ERROR Spake2pVerifier::Deserialize(ByteSpan inSerialized)
CHIP_ERROR Spake2pVerifier::Deserialize(const ByteSpan & inSerialized)
{
VerifyOrReturnError(inSerialized.size() >= kSpake2p_VerifierSerialized_Length, CHIP_ERROR_INVALID_ARGUMENT);

Expand Down
4 changes: 2 additions & 2 deletions src/crypto/CHIPCryptoPAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -1252,8 +1252,8 @@ class Spake2pVerifier
uint8_t mW0[kP256_FE_Length];
uint8_t mL[kP256_Point_Length];

CHIP_ERROR Serialize(MutableByteSpan & outSerialized);
CHIP_ERROR Deserialize(ByteSpan inSerialized);
CHIP_ERROR Serialize(MutableByteSpan & outSerialized) const;
CHIP_ERROR Deserialize(const ByteSpan & inSerialized);

/**
* @brief Generate the Spake2+ verifier.
Expand Down
5 changes: 5 additions & 0 deletions src/crypto/CHIPCryptoPALOpenSSL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,11 @@ CHIP_ERROR VerifyCertificateSigningRequest(const uint8_t * csr, size_t csr_lengt
X509_REQ_free(x509_req);
}

if (ec_key != nullptr)
{
EC_KEY_free(ec_key);
}

_logSSLError();
return error;
}
Expand Down
2 changes: 1 addition & 1 deletion src/platform/Darwin/KeyValueStoreManagerImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ - (instancetype)initWithContext:(nonnull NSManagedObjectContext *)context key:(n
ReturnErrorCodeIf(filepath == nil, CHIP_ERROR_INVALID_ARGUMENT);

// relative paths are relative to Documents folder
if ([filepath hasPrefix:@"/"]) {
if (![filepath hasPrefix:@"/"]) {
NSURL * documentsDirectory = [NSFileManager.defaultManager URLForDirectory:NSDocumentDirectory
inDomain:NSUserDomainMask
appropriateForURL:nil
Expand Down

0 comments on commit 172f9eb

Please sign in to comment.