Skip to content

Commit

Permalink
using p256 key from HSM for CASE (project-chip#8217)
Browse files Browse the repository at this point in the history
  • Loading branch information
sujaygkulkarni-nxp authored and Nikita committed Sep 23, 2021
1 parent 3d69e20 commit 5d07521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/credentials/CHIPOperationalCredentials.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#include <credentials/CHIPCert.h>
#include <crypto/CHIPCryptoPAL.h>
#include <support/DLLUtil.h>
#if CHIP_CRYPTO_HSM
#include <crypto/hsm/CHIPCryptoPALHsm.h>
#endif

#include <algorithm>
#include <map>
Expand Down Expand Up @@ -66,7 +69,11 @@ struct NodeCredentialMap
struct NodeKeypairMap
{
CertificateKeyId trustedRootId;
#ifdef ENABLE_HSM_CASE_OPS_KEY
P256KeypairHSM keypair;
#else
P256Keypair keypair;
#endif
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CASESession.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class DLL_EXPORT CASESession : public Messaging::ExchangeDelegate, public Pairin
Crypto::Hash_SHA256_stream mCommissioningHash;
Crypto::P256PublicKey mRemotePubKey;
#ifdef ENABLE_HSM_CASE_EPHERMAL_KEY
P256KeypairHSM mEphemeralKey;
Crypto::P256KeypairHSM mEphemeralKey;
#else
Crypto::P256Keypair mEphemeralKey;
#endif
Expand Down

0 comments on commit 5d07521

Please sign in to comment.