nl:: Weave:: WeaveSecurityManager
Tóm tắt
Hàm khởi tạo và hàm phá |
|
---|---|
WeaveSecurityManager(void)
|
Loại công khai |
|
---|---|
KeyErrorMsgRcvdFunct)(uint16_t keyId, uint8_t encType, uint32_t messageId, uint64_t peerNodeId, WEAVE_ERROR keyErr)
|
typedefvoid(*
Loại hàm xử lý thông báo lỗi chính. |
KeyExportCompleteFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, uint32_t exportedKeyId, const uint8_t *exportedKey, uint16_t exportedKeyLen)
|
typedefvoid(*
Loại hàm xử lý hoàn chỉnh giao thức xuất khoá. |
KeyExportErrorFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, WEAVE_ERROR localErr, StatusReport *statusReport)
|
typedefvoid(*
Loại hàm xử lý lỗi của giao thức xuất khoá. |
SessionErrorFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, WEAVE_ERROR localErr, uint64_t peerNodeId, StatusReport *statusReport)
|
typedefvoid(*
|
SessionEstablishedFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, uint16_t sessionKeyId, uint64_t peerNodeId, uint8_t encType)
|
typedefvoid(*
|
State
|
enum |
Thuộc tính công khai |
|
---|---|
CASEUseKnownECDHKey
|
bool
|
ExchangeManager
|
|
FabricState
|
|
IdleSessionTimeout
|
uint32_t
|
InitiatorAllowedCASEConfigs
|
uint8_t
|
InitiatorAllowedCASECurves
|
uint8_t
|
InitiatorAllowedKeyExportConfigs
|
uint8_t
|
InitiatorCASEConfig
|
uint32_t
|
InitiatorCASECurveId
|
uint32_t
|
InitiatorKeyExportConfig
|
uint8_t
|
OnKeyErrorMsgRcvd
|
Hàm callback key error.
|
OnSessionError
|
SessionErrorFunct
|
OnSessionEstablished
|
SessionEstablishedFunct
|
ResponderAllowedCASEConfigs
|
uint8_t
|
ResponderAllowedCASECurves
|
uint8_t
|
ResponderAllowedKeyExportConfigs
|
uint8_t
|
SessionEstablishTimeout
|
uint32_t
|
State
|
uint8_t
|
mCASEEngine
|
|
mKeyExport
|
|
mPASEEngine
|
|
mStartKeyExport_OnComplete
|
Giao thức xuất khoá hoàn tất hàm gọi lại.
|
mStartKeyExport_OnError
|
Hàm gọi lại lỗi của giao thức xuất khoá.
|
mStartKeyExport_ReqState
|
void *
|
mStartSecureSession_OnComplete
|
SessionEstablishedFunct
|
mStartSecureSession_OnError
|
SessionErrorFunct
|
mStartSecureSession_ReqState
|
void *
|
mTAKEEngine
|
Hàm công khai |
|
---|---|
CancelSessionEstablishment(void *reqState)
|
Huỷ quá trình thiết lập phiên đang tiến hành.
|
Init(WeaveExchangeManager & aExchangeMgr, System::Layer & aSystemLayer)
|
|
IsKeyError(WEAVE_ERROR err)
|
bool
Kiểm tra xem mã lỗi Weave được chỉ định có phải là một trong các mã lỗi chính không.
|
OnEncryptedMsgRcvd(uint16_t sessionKeyId, uint64_t peerNodeId, uint8_t encType)
|
void
|
ReleaseKey(uint64_t peerNodeId, uint16_t keyId)
|
void
Huỷ yêu cầu đặt trước khoá mã hoá cho tin nhắn.
|
ReserveKey(uint64_t peerNodeId, uint16_t keyId)
|
void
Đặt trước một khoá mã hoá thư.
|
SendKeyErrorMsg(WeaveMessageInfo *rcvdMsgInfo, const IPPacketInfo *rcvdMsgPacketInfo, WeaveConnection *con, WEAVE_ERROR keyErr)
|
Gửi thông báo lỗi quan trọng.
|
SetCASEAuthDelegate(WeaveCASEAuthDelegate *delegate)
|
void
|
SetKeyExportDelegate(WeaveKeyExportDelegate *delegate)
|
void
|
SetTAKEAuthDelegate(WeaveTAKEChallengerAuthDelegate *delegate)
|
void
|
SetTAKETokenAuthDelegate(WeaveTAKETokenAuthDelegate *delegate)
|
void
|
Shutdown(void)
|
|
StartCASESession(WeaveConnection *con, uint64_t peerNodeId, const IPAddress & peerAddr, uint16_t peerPort, WeaveAuthMode requestedAuthMode, void *reqState, SessionEstablishedFunct onComplete, SessionErrorFunct onError, WeaveCASEAuthDelegate *authDelegate, uint64_t terminatingNodeId)
|
Phương thức này được gọi để thiết lập phiên CASE mới hoặc tìm phiên CASE hiện có.
|
StartKeyExport(WeaveConnection *con, uint64_t peerNodeId, const IPAddress & peerAddr, uint16_t peerPort, uint32_t keyId, bool signMessage, void *reqState, KeyExportCompleteFunct onComplete, KeyExportErrorFunct onError, WeaveKeyExportDelegate *keyExportDelegate)
|
|
StartPASESession(WeaveConnection *con, WeaveAuthMode requestedAuthMode, void *reqState, SessionEstablishedFunct onComplete, SessionErrorFunct onError, const uint8_t *pw, uint16_t pwLen)
|
Phương thức này được gọi để thiết lập phiên PASE an toàn.
|
StartTAKESession(WeaveConnection *con, WeaveAuthMode requestedAuthMode, void *reqState, SessionEstablishedFunct onComplete, SessionErrorFunct onError, bool encryptAuthPhase, bool encryptCommPhase, bool timeLimitedIK, bool sendChallengerId, WeaveTAKEChallengerAuthDelegate *authDelegate)
|
Phương thức này được gọi để thiết lập phiên Take an toàn.
|
Loại công khai
KeyErrorMsgRcvdFunct
void(* KeyErrorMsgRcvdFunct)(uint16_t keyId, uint8_t encType, uint32_t messageId, uint64_t peerNodeId, WEAVE_ERROR keyErr)
Loại hàm xử lý thông báo lỗi chính.
Thông tin chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
KeyExportCompleteFunct
void(* KeyExportCompleteFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, uint32_t exportedKeyId, const uint8_t *exportedKey, uint16_t exportedKeyLen)
Loại hàm xử lý hoàn chỉnh giao thức xuất khoá.
Thông tin chi tiết | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
KeyExportErrorFunct
void(* KeyExportErrorFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, WEAVE_ERROR localErr, StatusReport *statusReport)
Loại hàm xử lý lỗi của giao thức xuất khoá.
Thông tin chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
SessionErrorFunct
void(* SessionErrorFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, WEAVE_ERROR localErr, uint64_t peerNodeId, StatusReport *statusReport)
SessionEstablishedFunct
void(* SessionEstablishedFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, uint16_t sessionKeyId, uint64_t peerNodeId, uint8_t encType)
Tiểu bang
State
Thuộc tính công khai
Trường hợp sử dụng đã biếtECDHKey
bool CASEUseKnownECDHKey
ExchangeManager
WeaveExchangeManager * ExchangeManager
FabricState
WeaveFabricState * FabricState
IdleSessionTimeout
uint32_t IdleSessionTimeout
InitiatorAllowedCASEConfigs
uint8_t InitiatorAllowedCASEConfigs
InitiatorAllowedCASECurves
uint8_t InitiatorAllowedCASECurves
InitiatorAllowedKeyExportConfigs
uint8_t InitiatorAllowedKeyExportConfigs
InitiatorCASEConfig
uint32_t InitiatorCASEConfig
InitiatorCASECurveId
uint32_t InitiatorCASECurveId
InitiatorKeyExportConfig
uint8_t InitiatorKeyExportConfig
OnKeyErrorMsgRcvd
KeyErrorMsgRcvdFunct OnKeyErrorMsgRcvd
Hàm callback key error.
Hàm này được gọi khi nhận được một thông báo lỗi chính.
OnSessionError
SessionErrorFunct OnSessionError
OnSessionEstablished
SessionEstablishedFunct OnSessionEstablished
ResponderAllowedCASEConfigs
uint8_t ResponderAllowedCASEConfigs
ResponderAllowedCASECurves
uint8_t ResponderAllowedCASECurves
ResponderAllowedKeyExportConfigs
uint8_t ResponderAllowedKeyExportConfigs
SessionEstablishTimeout
uint32_t SessionEstablishTimeout
Tiểu bang
uint8_t State
mCASEEngine
WeaveCASEEngine * mCASEEngine
mKeyExport
WeaveKeyExport * mKeyExport
mPASEEngine
WeavePASEEngine * mPASEEngine
mStartKeyExport_OnComplete
KeyExportCompleteFunct mStartKeyExport_OnComplete
Giao thức xuất khoá hoàn tất hàm gọi lại.
Hàm này được gọi khi quá trình xuất khoá bí mật hoàn tất.
mStartKeyExport_OnError
KeyExportErrorFunct mStartKeyExport_OnError
Hàm gọi lại lỗi của giao thức xuất khoá.
Hàm này được gọi khi xảy ra lỗi trong quá trình xuất khoá.
mStartKeyExport_ReqState
void * mStartKeyExport_ReqState
mStartSecureSession_OnComplete
SessionEstablishedFunct mStartSecureSession_OnComplete
mStartSecureSession_OnError
SessionErrorFunct mStartSecureSession_OnError
mStartSecureSession_ReqState
void * mStartSecureSession_ReqState
mTAKEEngine
WeaveTAKEEngine * mTAKEEngine
Hàm công khai
CancelSessionEstablishment
WEAVE_ERROR CancelSessionEstablishment( void *reqState )
Huỷ quá trình thiết lập phiên đang tiến hành.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các tham số |
|
||||
Giá trị trả về |
|
Bắt đầu
WEAVE_ERROR Init( WeaveExchangeManager & aExchangeMgr, System::Layer & aSystemLayer )
IsKeyError
bool IsKeyError( WEAVE_ERROR err )
Kiểm tra xem mã lỗi Weave được chỉ định có phải là một trong các mã lỗi chính không.
Hàm này được gọi để xác định xem có nên gửi thông báo lỗi chính đến trình tạo thông báo không tìm thấy khoá chính xác trong quá trình giải mã hay không.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các tham số |
|
||||
Giá trị trả về |
|
OnEncryptedMsgRcvd
void OnEncryptedMsgRcvd( uint16_t sessionKeyId, uint64_t peerNodeId, uint8_t encType )
ReleaseKey
void ReleaseKey( uint64_t peerNodeId, uint16_t keyId )
Huỷ yêu cầu đặt trước khoá mã hoá cho tin nhắn.
Huỷ yêu cầu đặt trước đã đặt trước đó trên khoá mã hoá thư.
Đối với mọi yêu cầu đặt trước trên một khoá cụ thể, phương thức ReleaseKey() chỉ được gọi một lần.
Phương thức này chấp nhận mọi dạng mã nhận dạng khoá, kể cả Không có. Những mã nhận dạng khoá không đặt tên cho khoá thực tế sẽ bị bỏ qua.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các tham số |
|
ReserveKey
void ReserveKey( uint64_t peerNodeId, uint16_t keyId )
Đặt trước một khoá mã hoá thư.
Đặt trước khoá dùng để báo hiệu rằng một khoá cụ thể đang được sử dụng và sẽ được giữ lại. Lưu ý rằng việc đặt trước trên khoá không đảm bảo rằng khoá sẽ không bị xoá do một thao tác rõ ràng (chẳng hạn như nhận được thông báo KeyError).
Đối với mọi giao dịch đặt trước trên một khoá cụ thể, bạn phải thực hiện lệnh gọi tương ứng đến ReleaseKey().
Phương thức này chấp nhận mọi dạng mã nhận dạng khoá, kể cả Không có. Những mã nhận dạng khoá không đặt tên cho khoá thực tế sẽ bị bỏ qua.
Thông tin chi tiết | |||||
---|---|---|---|---|---|
Các tham số |
|
SendKeyErrorMsg
WEAVE_ERROR SendKeyErrorMsg( WeaveMessageInfo *rcvdMsgInfo, const IPPacketInfo *rcvdMsgPacketInfo, WeaveConnection *con, WEAVE_ERROR keyErr )
Gửi thông báo lỗi quan trọng.
Hàm này được gọi khi không giải mã được thông báo Weave do lỗi khoá.
Thông tin chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
||||||||
Giá trị trả về |
|
SetCASEAuthDelegate
void SetCASEAuthDelegate( WeaveCASEAuthDelegate *delegate )
SetKeyExportDelegate
void SetKeyExportDelegate( WeaveKeyExportDelegate *delegate )
SetTAKEAuthDelegate
void SetTAKEAuthDelegate( WeaveTAKEChallengerAuthDelegate *delegate )
SetTAKETokenAuthDelegate
void SetTAKETokenAuthDelegate( WeaveTAKETokenAuthDelegate *delegate )
Tắt
WEAVE_ERROR Shutdown( void )
StartCASESession
WEAVE_ERROR StartCASESession( WeaveConnection *con, uint64_t peerNodeId, const IPAddress & peerAddr, uint16_t peerPort, WeaveAuthMode requestedAuthMode, void *reqState, SessionEstablishedFunct onComplete, SessionErrorFunct onError, WeaveCASEAuthDelegate *authDelegate, uint64_t terminatingNodeId )
Phương thức này được gọi để thiết lập phiên CASE mới hoặc tìm phiên CASE hiện có.
Thông tin chi tiết | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
||||||||||||||||||||
Giá trị trả về |
|
StartKeyExport
WEAVE_ERROR StartKeyExport( WeaveConnection *con, uint64_t peerNodeId, const IPAddress & peerAddr, uint16_t peerPort, uint32_t keyId, bool signMessage, void *reqState, KeyExportCompleteFunct onComplete, KeyExportErrorFunct onError, WeaveKeyExportDelegate *keyExportDelegate )
StartPASESession
WEAVE_ERROR StartPASESession( WeaveConnection *con, WeaveAuthMode requestedAuthMode, void *reqState, SessionEstablishedFunct onComplete, SessionErrorFunct onError, const uint8_t *pw, uint16_t pwLen )
Phương thức này được gọi để thiết lập phiên PASE an toàn.
Thông tin chi tiết | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
||||||||||||||
Giá trị trả về |
|
StartTAKESession
WEAVE_ERROR StartTAKESession( WeaveConnection *con, WeaveAuthMode requestedAuthMode, void *reqState, SessionEstablishedFunct onComplete, SessionErrorFunct onError, bool encryptAuthPhase, bool encryptCommPhase, bool timeLimitedIK, bool sendChallengerId, WeaveTAKEChallengerAuthDelegate *authDelegate )
Phương thức này được gọi để thiết lập phiên Take an toàn.
Thông tin chi tiết | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Các tham số |
|
||||||||||||||||||||
Giá trị trả về |
|
WeaveSecurityManager
WeaveSecurityManager( void )