class WeaveCertificateSet
Defined at line 223 of file gen/third_party/openweave-core/src/include/Weave/Profiles/security/WeaveCert.h
WeaveCertificateSet -- Collection of Weave certificate data providing methods for
certificate validation and signature verification.
Public Members
WeaveCertificateData * Certs
uint8_t CertCount
uint8_t MaxCerts
Protected Members
AllocFunct mAllocFunct
FreeFunct mFreeFunct
uint8_t * mDecodeBuf
uint16_t mDecodeBufSize
Public Methods
void WeaveCertificateSet ()
WEAVE_ERROR Init (uint8_t maxCerts, uint16_t decodeBufSize)
WEAVE_ERROR Init (uint8_tmaxCerts,uint16_tdecodeBufSize,AllocFunctallocFunct,FreeFunctfreeFunct)
WEAVE_ERROR Init (WeaveCertificateData *certBuf,uint8_tcertBufSize,uint8_t *decodeBuf,uint16_tdecodeBufSize)
void Release ()
void Clear ()
WEAVE_ERROR LoadCert (const uint8_t *weaveCert,uint32_tweaveCertLen,uint16_tdecodeFlags,WeaveCertificateData *&cert)
WEAVE_ERROR LoadCert (TLVReader &reader,uint16_tdecodeFlags,WeaveCertificateData *&cert)
WEAVE_ERROR LoadCerts (const uint8_t *encodedCerts,uint32_tencodedCertsLen,uint16_tdecodeFlags)
WEAVE_ERROR LoadCerts (TLVReader & reader, uint16_t decodeFlags)
WEAVE_ERROR AddTrustedKey (uint64_tcaId,uint32_tcurveId,const EncodedECPublicKey &pubKey,const uint8_t *pubKeyId,uint16_tpubKeyIdLen)
WEAVE_ERROR SaveCerts (TLVWriter &writer,WeaveCertificateData *firstCert,boolincludeTrusted)
WeaveCertificateData * FindCert (const CertificateKeyId & subjectKeyId)
WeaveCertificateData * LastCert ()
Defined at line 249 of file gen/third_party/openweave-core/src/include/Weave/Profiles/security/WeaveCert.h
WEAVE_ERROR LoadCertToElement (TLVReader &reader,uint16_tdecodeFlags,WeaveCertificateData *cert)
Load a weave-encoded cert from a TLVReader to a WeaveCertificateData pointer.
WEAVE_ERROR ReplaceCert (const uint8_t *weaveCert,uint32_tweaveCertLen,uint16_tdecodeFlags,WeaveCertificateData *&oldCert)
Replace a certificate in the set.
This takes a pointer to the old cert to be replaced, which can be
obtained by FindCert. The new cert is loaded to the pointer reference.
The args are parallel with the LoadCert API.
WEAVE_ERROR ValidateCert (WeaveCertificateData & cert, ValidationContext & context)
WEAVE_ERROR FindValidCert (const WeaveDN &subjectDN,const CertificateKeyId &subjectKeyId,ValidationContext &context,WeaveCertificateData *&cert)
WEAVE_ERROR GenerateECDSASignature (const uint8_t *msgHash,uint8_tmsgHashLen,WeaveCertificateData &cert,const EncodedECPrivateKey &privKey,EncodedECDSASignature &encodedSig)
WEAVE_ERROR VerifyECDSASignature (const uint8_t *msgHash,uint8_tmsgHashLen,const EncodedECDSASignature &encodedSig,WeaveCertificateData &cert)
Protected Methods
WEAVE_ERROR FindValidCert (const WeaveDN &subjectDN,const CertificateKeyId &subjectKeyId,ValidationContext &context,uint16_tvalidateFlags,uint8_tdepth,WeaveCertificateData *&cert)
WEAVE_ERROR ValidateCert (WeaveCertificateData &cert,ValidationContext &context,uint16_tvalidateFlags,uint8_tdepth)