透過集合功能整理內容 你可以依據偏好儲存及分類內容。

NL::編織::簡介::安全::編織證書集

概括

構造函數和析構函數

WeaveCertificateSet (void)

公共類型

AllocFunct )(size_t size)類型定義
void *(*
FreeFunct )(void *p)類型定義
void(*

公共屬性

CertCount
uint8_t
Certs
MaxCerts
uint8_t

受保護的屬性

mAllocFunct
AllocFunct
mDecodeBuf
uint8_t *
mDecodeBufSize
uint16_t
mFreeFunct
FreeFunct

公共職能

AddTrustedKey (uint64_t caId, uint32_t curveId, const EncodedECPublicKey & pubKey, const uint8_t *pubKeyId, uint16_t pubKeyIdLen)
Clear (void)
void
FindCert (const CertificateKeyId & subjectKeyId) const
FindValidCert (const WeaveDN & subjectDN, const CertificateKeyId & subjectKeyId, ValidationContext & context, WeaveCertificateData *& cert)
GenerateECDSASignature (const uint8_t *msgHash, uint8_t msgHashLen, WeaveCertificateData & cert, const EncodedECPrivateKey & privKey, EncodedECDSASignature & encodedSig)
Init (uint8_t maxCerts, uint16_t decodeBufSize)
Init (uint8_t maxCerts, uint16_t decodeBufSize, AllocFunct allocFunct, FreeFunct freeFunct)
Init ( WeaveCertificateData *certBuf, uint8_t certBufSize, uint8_t *decodeBuf, uint16_t decodeBufSize)
LastCert (void) const
LoadCert (const uint8_t *weaveCert, uint32_t weaveCertLen, uint16_t decodeFlags, WeaveCertificateData *& cert)
LoadCert (TLVReader & reader, uint16_t decodeFlags, WeaveCertificateData *& cert)
LoadCerts (const uint8_t *encodedCerts, uint32_t encodedCertsLen, uint16_t decodeFlags)
LoadCerts (TLVReader & reader, uint16_t decodeFlags)
Release (void)
void
SaveCerts (TLVWriter & writer, WeaveCertificateData *firstCert, bool includeTrusted)
ValidateCert ( WeaveCertificateData & cert, ValidationContext & context)
VerifyECDSASignature (const uint8_t *msgHash, uint8_t msgHashLen, const EncodedECDSASignature & encodedSig, WeaveCertificateData & cert)

受保護的功能

FindValidCert (const WeaveDN & subjectDN, const CertificateKeyId & subjectKeyId, ValidationContext & context, uint16_t validateFlags, uint8_t depth, WeaveCertificateData *& cert)
ValidateCert ( WeaveCertificateData & cert, ValidationContext & context, uint16_t validateFlags, uint8_t depth)

公共類型

分配函數

void *(* AllocFunct)(size_t size)

自由函數

void(* FreeFunct)(void *p)

公共屬性

證書計數

uint8_t CertCount

證書

WeaveCertificateData * Certs

最大證書數

uint8_t MaxCerts

受保護的屬性

分配函數

AllocFunct mAllocFunct

解碼緩衝區

uint8_t * mDecodeBuf

解碼緩衝區大小

uint16_t mDecodeBufSize

自由函數

FreeFunct mFreeFunct

公共職能

添加可信密鑰

WEAVE_ERROR AddTrustedKey(
  uint64_t caId,
  uint32_t curveId,
  const EncodedECPublicKey & pubKey,
  const uint8_t *pubKeyId,
  uint16_t pubKeyIdLen
)

清除

void Clear(
  void
)

查找證書

WeaveCertificateData * FindCert(
  const CertificateKeyId & subjectKeyId
) const 

查找有效證書

WEAVE_ERROR FindValidCert(
  const WeaveDN & subjectDN,
  const CertificateKeyId & subjectKeyId,
  ValidationContext & context,
  WeaveCertificateData *& cert
)

生成ECDSA簽名

WEAVE_ERROR GenerateECDSASignature(
  const uint8_t *msgHash,
  uint8_t msgHashLen,
  WeaveCertificateData & cert,
  const EncodedECPrivateKey & privKey,
  EncodedECDSASignature & encodedSig
)

在裡面

WEAVE_ERROR Init(
  uint8_t maxCerts,
  uint16_t decodeBufSize
)

在裡面

WEAVE_ERROR Init(
  uint8_t maxCerts,
  uint16_t decodeBufSize,
  AllocFunct allocFunct,
  FreeFunct freeFunct
)

在裡面

WEAVE_ERROR Init(
  WeaveCertificateData *certBuf,
  uint8_t certBufSize,
  uint8_t *decodeBuf,
  uint16_t decodeBufSize
)

最後證書

WeaveCertificateData * LastCert(
  void
) const 

加載證書

WEAVE_ERROR LoadCert(
  const uint8_t *weaveCert,
  uint32_t weaveCertLen,
  uint16_t decodeFlags,
  WeaveCertificateData *& cert
)

加載證書

WEAVE_ERROR LoadCert(
  TLVReader & reader,
  uint16_t decodeFlags,
  WeaveCertificateData *& cert
)

加載證書

WEAVE_ERROR LoadCerts(
  const uint8_t *encodedCerts,
  uint32_t encodedCertsLen,
  uint16_t decodeFlags
)

加載證書

WEAVE_ERROR LoadCerts(
  TLVReader & reader,
  uint16_t decodeFlags
)

釋放

void Release(
  void
)

保存證書

WEAVE_ERROR SaveCerts(
  TLVWriter & writer,
  WeaveCertificateData *firstCert,
  bool includeTrusted
)

驗證證書

WEAVE_ERROR ValidateCert(
  WeaveCertificateData & cert,
  ValidationContext & context
)

驗證ECDSA簽名

WEAVE_ERROR VerifyECDSASignature(
  const uint8_t *msgHash,
  uint8_t msgHashLen,
  const EncodedECDSASignature & encodedSig,
  WeaveCertificateData & cert
)

編織證書集

 WeaveCertificateSet(
  void
)

受保護的功能

查找有效證書

WEAVE_ERROR FindValidCert(
  const WeaveDN & subjectDN,
  const CertificateKeyId & subjectKeyId,
  ValidationContext & context,
  uint16_t validateFlags,
  uint8_t depth,
  WeaveCertificateData *& cert
)

驗證證書

WEAVE_ERROR ValidateCert(
  WeaveCertificateData & cert,
  ValidationContext & context,
  uint16_t validateFlags,
  uint8_t depth
)