nl :: Dệt :: WeaveSecurityManager
Tóm lược
Người xây dựng và Người phá hủy | |
---|---|
WeaveSecurityManager (void) |
Các loại công khai | |
---|---|
KeyErrorMsgRcvdFunct )(uint16_t keyId, uint8_t encType, uint32_t messageId, uint64_t peerNodeId, WEAVE_ERROR keyErr) | typedefvoid(* Loại chức năng 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 giao thức xuất khóa hoàn thành chức năng xử lý. |
KeyExportErrorFunct )(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, WEAVE_ERROR localErr, StatusReport *statusReport) | typedefvoid(* Loại chức năng xử lý lỗi giao thức xuất khóa. |
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 cộng | |
---|---|
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 | Chức năng gọi lại lỗi chính. |
OnSessionError | SessionErrorFunct |
OnSessionEstablished | SessionEstablishedFunct |
ResponderAllowedCASEConfigs | uint8_t |
ResponderAllowedCASECurves | uint8_t |
ResponderAllowedKeyExportConfigs | uint8_t |
SessionEstablishTimeout | uint32_t |
State | uint8_t |
mCASEEngine | |
mKeyExport | |
mPASEEngine | |
mStartKeyExport_OnComplete | Chức năng gọi lại giao thức xuất khóa hoàn chỉnh. |
mStartKeyExport_OnError | Chức năng gọi lại lỗi giao thức xuất khóa. |
mStartKeyExport_ReqState | void * |
mStartSecureSession_OnComplete | SessionEstablishedFunct |
mStartSecureSession_OnError | SessionErrorFunct |
mStartSecureSession_ReqState | void * |
mTAKEEngine |
Chức năng công cộng | |
---|---|
CancelSessionEstablishment (void *reqState) | Hủy 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 những mã lỗi chính hay không. |
OnEncryptedMsgRcvd (uint16_t sessionKeyId, uint64_t peerNodeId, uint8_t encType) | void |
ReleaseKey (uint64_t peerNodeId, uint16_t keyId) | void Giải phóng đặt trước khóa mã hóa tin nhắn. |
ReserveKey (uint64_t peerNodeId, uint16_t keyId) | void Đặt chỗ trên một khóa mã hóa tin nhắn. |
SendKeyErrorMsg ( WeaveMessageInfo *rcvdMsgInfo, const IPPacketInfo *rcvdMsgPacketInfo, WeaveConnection *con, WEAVE_ERROR keyErr) | Gửi thông báo lỗi chính. |
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 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. |
Các 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 chức năng xử lý thông báo lỗi chính.
Chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Thông số |
|
KeyExportCompleteFunct
void(* KeyExportCompleteFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, uint32_t exportedKeyId, const uint8_t *exportedKey, uint16_t exportedKeyLen)
Loại giao thức xuất khóa hoàn thành chức năng xử lý.
Chi tiết | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Thông số |
|
KeyExportErrorFunct
void(* KeyExportErrorFunct)(WeaveSecurityManager *sm, WeaveConnection *con, void *reqState, WEAVE_ERROR localErr, StatusReport *statusReport)
Loại chức năng xử lý lỗi giao thức xuất khóa.
Chi tiết | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Thông 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 cộng
CASEUseKnownECDHKey
bool CASEUseKnownECDHKey
ExchangeManager
WeaveExchangeManager * ExchangeManager
Nhà chế tạo
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
Chức năng gọi lại lỗi chính.
Chức năng này được gọi khi nhận được thông báo lỗi phím.
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
Chức năng gọi lại giao thức xuất khóa hoàn chỉnh.
Chức năng này được gọi khi quá trình xuất khóa bí mật hoàn tất.
mStartKeyExport_OnError
KeyExportErrorFunct mStartKeyExport_OnError
Chức năng gọi lại lỗi giao thức xuất khóa.
Hàm này được gọi khi gặp lỗi trong quá trình xuất khóa.
mStartKeyExport_ReqState
void * mStartKeyExport_ReqState
mStartSecureSession_OnComplete
SessionEstablishedFunct mStartSecureSession_OnComplete
mStartSecureSession_OnError
SessionErrorFunct mStartSecureSession_OnError
mStartSecureSession_ReqState
void * mStartSecureSession_ReqState
mTAKEEngine
WeaveTAKEEngine * mTAKEEngine
Chức năng công cộng
CancelSessionEstablishment
WEAVE_ERROR CancelSessionEstablishment( void *reqState )
Hủy thiết lập phiên đang tiến hành.
Chi tiết | |||||
---|---|---|---|---|---|
Thông số |
| ||||
Giá trị trả lại |
|
Trong đó
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 những mã lỗi chính hay không.
Hàm này được gọi để xác định xem liệu thông báo lỗi khóa có được gửi đến người khởi tạo thông báo không tìm thấy khóa chính xác trong quá trình giải mã hay không.
Chi tiết | |||||
---|---|---|---|---|---|
Thông số |
| ||||
Giá trị trả lại |
|
OnEncryptedMsgRcvd
void OnEncryptedMsgRcvd( uint16_t sessionKeyId, uint64_t peerNodeId, uint8_t encType )
ReleaseKey
void ReleaseKey( uint64_t peerNodeId, uint16_t keyId )
Giải phóng đặt trước khóa mã hóa tin nhắn.
Giải phóng các đặt chỗ trước đó đã được đặt trên một khóa mã hóa tin nhắn.
Đối với từng phần dành riêng đặt trên một phím đặc biệt, các ReleaseKey () phương pháp phải được gọi là không có nhiều hơn một lần.
Phương thức này chấp nhận bất kỳ dạng mã khóa nào, bao gồm cả Không có. Các id khóa không đặt tên cho các khóa thực tế sẽ bị bỏ qua.
Chi tiết | |||||
---|---|---|---|---|---|
Thông số |
|
ReserveKey
void ReserveKey( uint64_t peerNodeId, uint16_t keyId )
Đặt chỗ trên một khóa mã hóa tin nhắn.
Bảo lưu khóa được sử dụng để báo hiệu rằng một khóa cụ thể đang được sử dụng tích cực và cần được giữ lại. Lưu ý rằng việc đặt trước trên một khóa không đảm bảo rằng khóa sẽ không bị xóa bởi một hành động rõ ràng như nhận thông báo KeyError.
Đối với từng phần dành riêng đặt trên một phím đặc biệt, một cuộc gọi tương ứng với ReleaseKey () phải được thực hiện.
Phương thức này chấp nhận bất kỳ dạng mã khóa nào, bao gồm cả Không có. Các id khóa không đặt tên cho các khóa thực tế sẽ bị bỏ qua.
Chi tiết | |||||
---|---|---|---|---|---|
Thông số |
|
SendKeyErrorMsg
WEAVE_ERROR SendKeyErrorMsg( WeaveMessageInfo *rcvdMsgInfo, const IPPacketInfo *rcvdMsgPacketInfo, WeaveConnection *con, WEAVE_ERROR keyErr )
Gửi thông báo lỗi chính.
Chức năng này được gọi khi nhận được tin nhắn Weave giải mã không thành công do lỗi phím.
Chi tiết | |||||||||
---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||
Giá trị trả lại |
|
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 mới hoặc tìm phiên CASE hiện có.
Chi tiết | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||||||||||||||
Giá trị trả lại |
|
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.
Chi tiết | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||||||||
Giá trị trả lại |
|
Bắt đầu
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.
Chi tiết | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Thông số |
| ||||||||||||||||||||
Giá trị trả lại |
|
WeaveSecurityManager
WeaveSecurityManager( void )