nl:: Weave:: Profiles:: Security:: CASE:: WeaveCASEEngine
#include <src/lib/profiles/security/WeaveCASE.h>
实现 Weave CASE 协议的核心逻辑。
摘要
公共类型 |
|
---|---|
EngineState
|
枚举 |
公共属性 |
|
---|---|
AfterKeyGen
|
struct nl::Weave::Profiles::Security::CASE::WeaveCASEEngine::@232::@234
|
AuthDelegate
|
|
BeforeKeyGen
|
struct nl::Weave::Profiles::Security::CASE::WeaveCASEEngine::@232::@233
|
ECDHPrivateKey[kMaxECDHPrivateKeySize]
|
uint8_t
|
ECDHPrivateKeyLength
|
uint16_t
|
EncryptionKey
|
|
EncryptionType
|
uint8_t
|
InitiatorKeyConfirmHash[kMaxHashLength]
|
uint8_t
|
RequestMsgHash[kMaxHashLength]
|
uint8_t
|
SessionKeyId
|
uint16_t
|
State
|
uint8_t
|
公共类型
引擎状态
EngineState
公共属性
AfterKeyGen
struct nl::Weave::Profiles::Security::CASE::WeaveCASEEngine::@232::@234 AfterKeyGen
身份验证委托
WeaveCASEAuthDelegate * AuthDelegate
旧版 KeyGen
struct nl::Weave::Profiles::Security::CASE::WeaveCASEEngine::@232::@233 BeforeKeyGen
ECDH 私钥
uint8_t ECDHPrivateKey[kMaxECDHPrivateKeySize]
ECDHPrivateKeyLength
uint16_t ECDHPrivateKeyLength
EncryptionKey
WeaveEncryptionKey EncryptionKey
EncryptionType
uint8_t EncryptionType
InitiatorKeyConfirmHash
uint8_t InitiatorKeyConfirmHash[kMaxHashLength]
请求哈希
uint8_t RequestMsgHash[kMaxHashLength]
会话密钥 ID
uint16_t SessionKeyId
状态
uint8_t State
公共函数
允许的配置
uint8_t AllowedConfigs() const
允许曲线
uint8_t AllowedCurves() const
证书类型
uint8_t CertType() const
GenerateBeginSessionRequest
WEAVE_ERROR GenerateBeginSessionRequest( BeginSessionRequestContext & reqCtx, PacketBuffer *msgBuf )
GenerateBeginSessionResponse
WEAVE_ERROR GenerateBeginSessionResponse( BeginSessionResponseContext & respCtx, PacketBuffer *msgBuf, BeginSessionRequestContext & reqCtx )
GenerateInitiatorKeyConfirm
WEAVE_ERROR GenerateInitiatorKeyConfirm( PacketBuffer *msgBuf )
GetSessionKey
WEAVE_ERROR GetSessionKey( const WeaveEncryptionKey *& encKey )
Init
void Init( void )
已允许配置
bool IsAllowedConfig( uint32_t config ) const
允许的曲线
bool IsAllowedCurve( uint32_t curveId ) const
启动程序
bool IsInitiator() const
执行密钥确认
bool PerformingKeyConfirm() const
进程开始会话请求
WEAVE_ERROR ProcessBeginSessionRequest( PacketBuffer *msgBuf, BeginSessionRequestContext & reqCtx, ReconfigureContext & reconfCtx )
进程开始会话响应
WEAVE_ERROR ProcessBeginSessionResponse( PacketBuffer *msgBuf, BeginSessionResponseContext & respCtx )
确认进程
WEAVE_ERROR ProcessInitiatorKeyConfirm( PacketBuffer *msgBuf )
进程重新配置
WEAVE_ERROR ProcessReconfigure( PacketBuffer *msgBuf, ReconfigureContext & reconfCtx )
重置
void Reset( void )
响应者需要密钥确认
bool ResponderRequiresKeyConfirm() const
选定配置
uint32_t SelectedConfig() const
选定曲线
uint32_t SelectedCurve() const
SetAllowedConfigs
void SetAllowedConfigs( uint8_t allowedConfigs )
SetAllowedCurves
void SetAllowedCurves( uint8_t allowedCurves )
SetAlternateConfig
void SetAlternateConfigs( BeginSessionRequestContext & reqCtx )
SetAlternateCurve
void SetAlternateCurves( BeginSessionRequestContext & reqCtx )
SetCertType
void SetCertType( uint8_t certType )
SetReplyerRequireKeyConfirm
void SetResponderRequiresKeyConfirm( bool val )
设置已知 ECDH 键
void SetUseKnownECDHKey( bool val )
关机
void Shutdown( void )
使用已知的 ECDH 键
bool UseKnownECDHKey() const