diff --git a/src/credentials/CHIPCert.cpp b/src/credentials/CHIPCert.cpp index 3426b510467a5b..330ea71e4c990f 100644 --- a/src/credentials/CHIPCert.cpp +++ b/src/credentials/CHIPCert.cpp @@ -374,47 +374,20 @@ CHIP_ERROR ChipCertificateSet::FindValidCert(const ChipDN & subjectDN, const Cer CHIP_ERROR ChipCertificateSet::VerifySignature(const ChipCertificateData * cert, const ChipCertificateData * caCert) { - static constexpr size_t kMaxBytesForDeferredLenList = sizeof(uint8_t *) + // size of a single pointer in the deferred list - 4 + // extra memory allocated for the deferred length field (kLengthFieldReserveSize - 1) - 3; // the deferred length list is alligned to 32bit boundary - - CHIP_ERROR err; P256PublicKey caPublicKey; P256ECDSASignature signature; - uint8_t tmpBuf[signature.Capacity() + kMaxBytesForDeferredLenList]; - ASN1Writer writer; + uint16_t derSigLen; - writer.Init(tmpBuf, static_cast(sizeof(tmpBuf))); + ReturnErrorOnFailure(ConvertECDSASignatureRawToDER(cert->mSignature, cert->mSignatureLen, signature, + static_cast(signature.Capacity()), derSigLen)); - // Ecdsa-Sig-Value ::= SEQUENCE - ASN1_START_SEQUENCE - { - // r INTEGER - err = writer.PutValue(kASN1TagClass_Universal, kASN1UniversalTag_Integer, false, cert->mSignature.R, cert->mSignature.RLen); - SuccessOrExit(err); - - // s INTEGER - err = writer.PutValue(kASN1TagClass_Universal, kASN1UniversalTag_Integer, false, cert->mSignature.S, cert->mSignature.SLen); - SuccessOrExit(err); - } - ASN1_END_SEQUENCE; - - err = writer.Finalize(); - SuccessOrExit(err); - - VerifyOrExit(writer.GetLengthWritten() <= signature.Capacity(), err = CHIP_ERROR_BUFFER_TOO_SMALL); - - memcpy(signature, tmpBuf, writer.GetLengthWritten()); - err = signature.SetLength(writer.GetLengthWritten()); - SuccessOrExit(err); + ReturnErrorOnFailure(signature.SetLength(derSigLen)); memcpy(caPublicKey, caCert->mPublicKey, caCert->mPublicKeyLen); - err = caPublicKey.ECDSA_validate_hash_signature(cert->mTBSHash, chip::Crypto::kSHA256_Hash_Length, signature); - SuccessOrExit(err); + ReturnErrorOnFailure(caPublicKey.ECDSA_validate_hash_signature(cert->mTBSHash, chip::Crypto::kSHA256_Hash_Length, signature)); -exit: - return err; + return CHIP_NO_ERROR; } CHIP_ERROR ChipCertificateSet::ValidateCert(const ChipCertificateData * cert, ValidationContext & context, @@ -607,10 +580,8 @@ void ChipCertificateData::Clear() mKeyUsageFlags.ClearAll(); mKeyPurposeFlags.ClearAll(); mPathLenConstraint = 0; - mSignature.R = nullptr; - mSignature.RLen = 0; - mSignature.S = nullptr; - mSignature.SLen = 0; + mSignature = nullptr; + mSignatureLen = 0; memset(mTBSHash, 0, sizeof(mTBSHash)); } @@ -624,10 +595,8 @@ bool ChipCertificateData::IsEqual(const ChipCertificateData & other) const (mPubKeyCurveOID == other.mPubKeyCurveOID) && (mPubKeyAlgoOID == other.mPubKeyAlgoOID) && (mSigAlgoOID == other.mSigAlgoOID) && (mCertFlags.Raw() == other.mCertFlags.Raw()) && (mKeyUsageFlags.Raw() == other.mKeyUsageFlags.Raw()) && (mKeyPurposeFlags.Raw() == other.mKeyPurposeFlags.Raw()) && - (mPathLenConstraint == other.mPathLenConstraint) && (mSignature.RLen == other.mSignature.RLen) && - (memcmp(mSignature.R, other.mSignature.R, mSignature.RLen) == 0) && (mSignature.SLen == other.mSignature.SLen) && - (memcmp(mSignature.S, other.mSignature.S, mSignature.SLen) == 0) && - (memcmp(mTBSHash, other.mTBSHash, sizeof(mTBSHash)) == 0); + (mPathLenConstraint == other.mPathLenConstraint) && (mSignatureLen == other.mSignatureLen) && + (memcmp(mSignature, other.mSignature, mSignatureLen) == 0) && (memcmp(mTBSHash, other.mTBSHash, sizeof(mTBSHash)) == 0); } void ValidationContext::Reset() @@ -873,5 +842,119 @@ DLL_EXPORT CHIP_ERROR ChipEpochToASN1Time(uint32_t epochTime, chip::ASN1::ASN1Un return CHIP_NO_ERROR; } +CHIP_ERROR ConvertIntegerDERToRaw(const uint8_t * derInt, uint16_t derIntLen, uint8_t * rawInt, const uint16_t rawIntLen) +{ + VerifyOrReturnError(derInt != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(derIntLen > 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(rawInt != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + /* one leading zero is allowed for positive integer in ASN1 DER format */ + if (*derInt == 0) + { + derInt++; + derIntLen--; + } + + VerifyOrReturnError(derIntLen <= rawIntLen, CHIP_ERROR_INVALID_ARGUMENT); + + if (derIntLen > 0) + { + VerifyOrReturnError(*derInt != 0, CHIP_ERROR_INVALID_ARGUMENT); + } + + memset(rawInt, 0, (rawIntLen - derIntLen)); + memcpy(rawInt + (rawIntLen - derIntLen), derInt, derIntLen); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConvertIntegerRawToDER(const uint8_t * rawInt, uint16_t rawIntLen, uint8_t * derInt, const uint16_t derIntBufSize, + uint16_t & derIntLen) +{ + VerifyOrReturnError(rawInt != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(rawIntLen > 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(derInt != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + while (*rawInt == 0) + { + rawInt++; + rawIntLen--; + } + + if (*rawInt & 0x80) /* Need Leading Zero */ + { + VerifyOrReturnError(rawIntLen <= UINT16_MAX - 1, CHIP_ERROR_BUFFER_TOO_SMALL); + VerifyOrReturnError(derIntBufSize >= rawIntLen + 1, CHIP_ERROR_BUFFER_TOO_SMALL); + + *derInt++ = 0; + derIntLen = static_cast(rawIntLen + 1); + } + else + { + VerifyOrReturnError(derIntBufSize >= rawIntLen, CHIP_ERROR_BUFFER_TOO_SMALL); + + derIntLen = rawIntLen; + } + + memcpy(derInt, rawInt, rawIntLen); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConvertECDSASignatureRawToDER(const uint8_t * rawSig, uint16_t rawSigLen, uint8_t * derSig, const uint16_t derSigBufSize, + uint16_t & derSigLen) +{ + static constexpr size_t kMaxBytesForDeferredLenList = sizeof(uint8_t *) + // size of a single pointer in the deferred list + 4 + // extra memory allocated for the deferred length field (kLengthFieldReserveSize - 1) + 3; // the deferred length list is alligned to 32bit boundary + + uint8_t localDERSigBuf[kMax_ECDSA_Signature_Length + kMaxBytesForDeferredLenList]; + ASN1Writer writer; + + VerifyOrReturnError(rawSig != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(rawSigLen > 0, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(derSig != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + writer.Init(localDERSigBuf, sizeof(localDERSigBuf)); + + ReturnErrorOnFailure(ConvertECDSASignatureRawToDER(rawSig, rawSigLen, writer)); + + ReturnErrorOnFailure(writer.Finalize()); + + derSigLen = writer.GetLengthWritten(); + + VerifyOrReturnError(derSigLen <= derSigBufSize, CHIP_ERROR_BUFFER_TOO_SMALL); + + memcpy(derSig, localDERSigBuf, derSigLen); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ConvertECDSASignatureRawToDER(const uint8_t * rawSig, uint16_t rawSigLen, ASN1Writer & writer) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t derInt[kP256_FE_Length + 1]; + uint16_t derIntLen; + + VerifyOrReturnError(rawSig != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(rawSigLen == kP256_ECDSA_Signature_Length_Raw, CHIP_ERROR_INVALID_ARGUMENT); + + // Ecdsa-Sig-Value ::= SEQUENCE + ASN1_START_SEQUENCE + { + // r INTEGER + ReturnErrorOnFailure(ConvertIntegerRawToDER(rawSig, kP256_FE_Length, derInt, sizeof(derInt), derIntLen)); + ReturnErrorOnFailure(writer.PutValue(kASN1TagClass_Universal, kASN1UniversalTag_Integer, false, derInt, derIntLen)); + + // s INTEGER + ReturnErrorOnFailure(ConvertIntegerRawToDER(rawSig + kP256_FE_Length, kP256_FE_Length, derInt, sizeof(derInt), derIntLen)); + ReturnErrorOnFailure(writer.PutValue(kASN1TagClass_Universal, kASN1UniversalTag_Integer, false, derInt, derIntLen)); + } + ASN1_END_SEQUENCE; + +exit: + return err; +} + } // namespace Credentials } // namespace chip diff --git a/src/credentials/CHIPCert.h b/src/credentials/CHIPCert.h old mode 100644 new mode 100755 index 1c7a5a87bc8f98..7672caf845ea65 --- a/src/credentials/CHIPCert.h +++ b/src/credentials/CHIPCert.h @@ -63,7 +63,7 @@ enum kTag_EllipticCurveIdentifier = 8, /**< [ unsigned int ] For EC certs, identifies the elliptic curve used. */ kTag_EllipticCurvePublicKey = 9, /**< [ byte string ] The elliptic curve public key, in X9.62 encoded format. */ kTag_Extensions = 10, /**< [ list ] Certificate extensions. */ - kTag_ECDSASignature = 11, /**< [ structure ] The ECDSA signature for the certificate. */ + kTag_ECDSASignature = 11, /**< [ byte string ] The ECDSA signature for the certificate. */ // ---- Context-specific Tags for certificate extensions ---- kTag_BasicConstraints = 1, /**< [ structure ] Identifies whether the subject of the certificate is a CA. */ @@ -73,10 +73,6 @@ enum kTag_AuthorityKeyIdentifier = 5, /**< [ byte string ] Identifier of the public key used to sign the certificate. */ kTag_FutureExtension = 6, /**< [ byte string ] Arbitrary extention. DER encoded SEQUENCE as in X.509 form. */ - // ---- Context-specific Tags for ECDSASignature Structure ---- - kTag_ECDSASignature_r = 1, /**< [ byte string ] ECDSA r value, in ASN.1 integer encoding. */ - kTag_ECDSASignature_s = 2, /**< [ byte string ] ECDSA s value, in ASN.1 integer encoding. */ - // ---- Context-specific Tags for BasicConstraints Structure ---- kTag_BasicConstraints_IsCA = 1, /**< [ boolean ] True if the certificate can be used to verify certificate signatures. */ @@ -310,6 +306,7 @@ struct ChipCertificateData void Clear(); bool IsEqual(const ChipCertificateData & other) const; + // TODO: Review and consider replacing some data pointer/len pairs with ByteSpan and FixedByteSpan types. ByteSpan mCertificate; /**< Original raw buffer data. */ ChipDN mSubjectDN; /**< Certificate Subject DN. */ ChipDN mIssuerDN; /**< Certificate Issuer DN. */ @@ -326,14 +323,10 @@ struct ChipCertificateData BitFlags mKeyUsageFlags; /**< Certificate key usage extensions flags. */ BitFlags mKeyPurposeFlags; /**< Certificate extended key usage extensions flags. */ uint8_t mPathLenConstraint; /**< Basic constraint: path length. */ - struct - { - const uint8_t * R; /**< Pointer to the R element of the signature, encoded as ASN.1 DER Integer. */ - uint8_t RLen; /**< Length of R. */ - const uint8_t * S; /**< Pointer to the S element of the signature, encoded as ASN.1 DER Integer. */ - uint8_t SLen; /**< Length of R. */ - } mSignature; /**< Certificate signature structure. */ - uint8_t mTBSHash[chip::Crypto::kSHA256_Hash_Length]; /**< Certificate TBS hash. */ + const uint8_t * mSignature; /**< Pointer to the certificate signature. */ + uint8_t mSignatureLen; /**< Certificate signature length. */ + + uint8_t mTBSHash[Crypto::kSHA256_Hash_Length]; /**< Certificate TBS hash. */ }; /** @@ -789,5 +782,68 @@ inline bool IsChipDNAttr(chip::ASN1::OID oid) return (IsChip64bitDNAttr(oid) || IsChip32bitDNAttr(oid)); } +/** + * @brief Convert an ASN.1 DER encoded integer to a raw big-endian integer. + * + * @param derInt Buffer that holds ASN.1 DER encoded integer. + * @param derIntLen The length of the ASN.1 DER encoded integer. + * @param rawInt Buffer to store converted raw integer. + * @param rawIntLen The length of the converted raw integer. + * + * @retval #CHIP_NO_ERROR If the integer value was successfully converted. + */ +CHIP_ERROR ConvertIntegerDERToRaw(const uint8_t * derInt, uint16_t derIntLen, uint8_t * rawInt, const uint16_t rawIntLen); + +/** + * @brief Convert a raw integer in big-endian form to an ASN.1 DER encoded integer. + * + * @param rawInt Buffer that holds raw integer. + * @param rawIntLen The length of the raw integer. + * @param derInt Buffer to store converted ASN.1 DER encoded integer. + * @param derIntBufSize The size of the buffer to store ASN.1 DER encoded integer. + * @param derIntLen The length of the ASN.1 DER encoded integer. + * + * @retval #CHIP_NO_ERROR If the integer value was successfully converted. + */ +CHIP_ERROR ConvertIntegerRawToDER(const uint8_t * rawInt, uint16_t rawIntLen, uint8_t * derInt, const uint16_t derIntBufSize, + uint16_t & derIntLen); + +/** + * @brief Convert a raw CHIP signature to an ASN.1 DER encoded signature structure. + * + * @param rawSig Buffer that holds raw CHIP signature. + * @param rawSigLen The length of the raw CHIP signature. + * @param derSig Buffer to store converted ASN.1 DER encoded signature. + * @param derSigBufSize The size of the buffer to store ASN.1 DER encoded signature. + * @param derSigLen The length of the ASN.1 DER encoded signature. + * + * @retval #CHIP_NO_ERROR If the signature value was successfully converted. + */ +CHIP_ERROR ConvertECDSASignatureRawToDER(const uint8_t * rawSig, uint16_t rawSigLen, uint8_t * derSig, const uint16_t derSigBufSize, + uint16_t & derSigLen); + +/** + * @brief Convert a raw CHIP ECDSA signature to an ASN.1 DER encoded signature structure. + * + * @param rawSig Buffer that holds raw CHIP signature. + * @param rawSigLen The length of the raw CHIP signature. + * @param writer A reference to the ASN1Writer to store ASN.1 DER encoded signature. + * + * @retval #CHIP_NO_ERROR If the signature value was successfully converted. + */ +CHIP_ERROR ConvertECDSASignatureRawToDER(const uint8_t * rawSig, uint16_t rawSigLen, ASN1::ASN1Writer & writer); + +/** + * @brief Convert an ASN.1 DER encoded ECDSA signature to a raw CHIP signature. + * + * @param reader A reference to the ASN1Reader positioned at the beginning of the + * DER encoded ECDSA signature. + * @param writer A reference to the TLVWriter to store TLV encoded ECDSA signature element. + * @param tag Tag to use for TLV encoded signature. + * + * @retval #CHIP_NO_ERROR If the signature value was successfully converted. + */ +CHIP_ERROR ConvertECDSASignatureDERToRaw(ASN1::ASN1Reader & reader, chip::TLV::TLVWriter & writer, uint64_t tag); + } // namespace Credentials } // namespace chip diff --git a/src/credentials/CHIPCertFromX509.cpp b/src/credentials/CHIPCertFromX509.cpp old mode 100644 new mode 100755 index 7626684af498af..6a16512b464a12 --- a/src/credentials/CHIPCertFromX509.cpp +++ b/src/credentials/CHIPCertFromX509.cpp @@ -45,6 +45,7 @@ namespace Credentials { using namespace chip::ASN1; using namespace chip::TLV; using namespace chip::Protocols; +using namespace chip::Crypto; static ASN1_ERROR ParseChipAttribute(ASN1Reader & reader, uint64_t & chipAttrOut) { @@ -516,6 +517,39 @@ static CHIP_ERROR ConvertExtensions(ASN1Reader & reader, TLVWriter & writer) return err; } +CHIP_ERROR ConvertECDSASignatureDERToRaw(ASN1Reader & reader, TLVWriter & writer, uint64_t tag) +{ + CHIP_ERROR err = CHIP_NO_ERROR; + uint8_t rawSig[kP256_ECDSA_Signature_Length_Raw]; + + // Per RFC3279, the ECDSA signature value is encoded in DER encapsulated in the signatureValue BIT STRING. + ASN1_ENTER_ENCAPSULATED(kASN1TagClass_Universal, kASN1UniversalTag_BitString) + { + // Ecdsa-Sig-Value ::= SEQUENCE + ASN1_PARSE_ENTER_SEQUENCE + { + // r INTEGER + ASN1_PARSE_ELEMENT(kASN1TagClass_Universal, kASN1UniversalTag_Integer); + VerifyOrReturnError(reader.GetValueLen() <= UINT16_MAX, CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure( + ConvertIntegerDERToRaw(reader.GetValue(), static_cast(reader.GetValueLen()), rawSig, kP256_FE_Length)); + + // s INTEGER + ASN1_PARSE_ELEMENT(kASN1TagClass_Universal, kASN1UniversalTag_Integer); + VerifyOrReturnError(reader.GetValueLen() <= UINT16_MAX, CHIP_ERROR_INVALID_ARGUMENT); + ReturnErrorOnFailure(ConvertIntegerDERToRaw(reader.GetValue(), static_cast(reader.GetValueLen()), + rawSig + kP256_FE_Length, kP256_FE_Length)); + } + ASN1_EXIT_SEQUENCE; + } + ASN1_EXIT_ENCAPSULATED; + + ReturnErrorOnFailure(writer.PutBytes(tag, rawSig, kP256_ECDSA_Signature_Length_Raw)); + +exit: + return err; +} + static CHIP_ERROR ConvertCertificate(ASN1Reader & reader, TLVWriter & writer) { CHIP_ERROR err; @@ -633,33 +667,7 @@ static CHIP_ERROR ConvertCertificate(ASN1Reader & reader, TLVWriter & writer) // signatureValue BIT STRING ASN1_PARSE_ELEMENT(kASN1TagClass_Universal, kASN1UniversalTag_BitString); - // Per RFC3279, the ECDSA signature value is encoded in DER encapsulated in the signatureValue BIT STRING. - ASN1_ENTER_ENCAPSULATED(kASN1TagClass_Universal, kASN1UniversalTag_BitString) - { - TLVType outerContainer; - - err = writer.StartContainer(ContextTag(kTag_ECDSASignature), kTLVType_Structure, outerContainer); - SuccessOrExit(err); - - // Ecdsa-Sig-Value ::= SEQUENCE - ASN1_PARSE_ENTER_SEQUENCE - { - // r INTEGER - ASN1_PARSE_ELEMENT(kASN1TagClass_Universal, kASN1UniversalTag_Integer); - err = writer.PutBytes(ContextTag(kTag_ECDSASignature_r), reader.GetValue(), reader.GetValueLen()); - SuccessOrExit(err); - - // s INTEGER - ASN1_PARSE_ELEMENT(kASN1TagClass_Universal, kASN1UniversalTag_Integer); - err = writer.PutBytes(ContextTag(kTag_ECDSASignature_s), reader.GetValue(), reader.GetValueLen()); - SuccessOrExit(err); - } - ASN1_EXIT_SEQUENCE; - - err = writer.EndContainer(outerContainer); - SuccessOrExit(err); - } - ASN1_EXIT_ENCAPSULATED; + ReturnErrorOnFailure(ConvertECDSASignatureDERToRaw(reader, writer, ContextTag(kTag_ECDSASignature))); } ASN1_EXIT_SEQUENCE; diff --git a/src/credentials/CHIPCertToX509.cpp b/src/credentials/CHIPCertToX509.cpp index 3a69888abe88f9..ac9343626ebcac 100644 --- a/src/credentials/CHIPCertToX509.cpp +++ b/src/credentials/CHIPCertToX509.cpp @@ -47,6 +47,7 @@ namespace Credentials { using namespace chip::ASN1; using namespace chip::TLV; using namespace chip::Protocols; +using namespace chip::Crypto; static CHIP_ERROR DecodeConvertDN(TLVReader & reader, ASN1Writer & writer, ChipDN & dn) { @@ -674,77 +675,27 @@ static CHIP_ERROR DecodeConvertExtensions(TLVReader & reader, ASN1Writer & write CHIP_ERROR DecodeECDSASignature(TLVReader & reader, ChipCertificateData & certData) { - CHIP_ERROR err; - TLVType containerType; - uint32_t len; - - err = reader.Next(kTLVType_Structure, ContextTag(kTag_ECDSASignature)); - SuccessOrExit(err); + ReturnErrorOnFailure(reader.Next(kTLVType_ByteString, ContextTag(kTag_ECDSASignature))); - err = reader.EnterContainer(containerType); - SuccessOrExit(err); + VerifyOrReturnError(reader.GetLength() == kP256_ECDSA_Signature_Length_Raw, CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + certData.mSignatureLen = kP256_ECDSA_Signature_Length_Raw; - // r INTEGER - err = reader.Next(kTLVType_ByteString, ContextTag(kTag_ECDSASignature_r)); - SuccessOrExit(err); - - err = reader.GetDataPtr(certData.mSignature.R); - SuccessOrExit(err); - - len = reader.GetLength(); - VerifyOrExit(len <= UINT8_MAX, err = CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); - - certData.mSignature.RLen = static_cast(len); - - // s INTEGER - err = reader.Next(kTLVType_ByteString, ContextTag(kTag_ECDSASignature_s)); - SuccessOrExit(err); - - err = reader.GetDataPtr(certData.mSignature.S); - SuccessOrExit(err); - - len = reader.GetLength(); - VerifyOrExit(len <= UINT8_MAX, err = CHIP_ERROR_UNSUPPORTED_CERT_FORMAT); + ReturnErrorOnFailure(reader.GetDataPtr(certData.mSignature)); - certData.mSignature.SLen = static_cast(len); - - // Verify no more elements in the signature. - reader.Next(); - err = reader.VerifyEndOfContainer(); - SuccessOrExit(err); - - err = reader.ExitContainer(containerType); - SuccessOrExit(err); - -exit: - return err; + return CHIP_NO_ERROR; } static CHIP_ERROR DecodeConvertECDSASignature(TLVReader & reader, ASN1Writer & writer, ChipCertificateData & certData) { - CHIP_ERROR err; + CHIP_ERROR err = CHIP_NO_ERROR; - err = DecodeECDSASignature(reader, certData); - SuccessOrExit(err); + ReturnErrorOnFailure(DecodeECDSASignature(reader, certData)); // signatureValue BIT STRING // Per RFC3279, the ECDSA signature value is encoded in DER encapsulated in the signatureValue BIT STRING. ASN1_START_BIT_STRING_ENCAPSULATED { - // Ecdsa-Sig-Value ::= SEQUENCE - ASN1_START_SEQUENCE - { - // r INTEGER - err = writer.PutValue(kASN1TagClass_Universal, kASN1UniversalTag_Integer, false, certData.mSignature.R, - certData.mSignature.RLen); - SuccessOrExit(err); - - // s INTEGER - err = writer.PutValue(kASN1TagClass_Universal, kASN1UniversalTag_Integer, false, certData.mSignature.S, - certData.mSignature.SLen); - SuccessOrExit(err); - } - ASN1_END_SEQUENCE; + ReturnErrorOnFailure(ConvertECDSASignatureRawToDER(certData.mSignature, certData.mSignatureLen, writer)); } ASN1_END_ENCAPSULATED; diff --git a/src/credentials/tests/CHIPCert_test_vectors.cpp b/src/credentials/tests/CHIPCert_test_vectors.cpp index f6c91258428883..05ed17961a7585 100644 --- a/src/credentials/tests/CHIPCert_test_vectors.cpp +++ b/src/credentials/tests/CHIPCert_test_vectors.cpp @@ -236,19 +236,19 @@ HHNoBNCFMhYUdJROaoQqEdpxk28Y5Ek4fA== */ extern const uint8_t sTestCert_Root01_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x51, 0xa0, 0xe1, 0x27, 0xab, 0x59, 0xd7, 0x01, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, - 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24, - 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x6c, 0x5b, 0x7c, 0x34, 0x1a, 0xd1, 0x95, 0xd2, 0x46, 0xfa, 0x0c, 0x7d, 0xd6, 0x25, 0x43, - 0x81, 0x94, 0x28, 0x5a, 0xaa, 0x8f, 0x13, 0x47, 0x3f, 0x7d, 0x61, 0x8f, 0xc9, 0xbd, 0x44, 0xf2, 0xdd, 0x5e, 0xec, 0xd5, 0x71, - 0xfa, 0xf0, 0x9c, 0x1c, 0x73, 0x68, 0x04, 0xd0, 0x85, 0x32, 0x16, 0x14, 0x74, 0x94, 0x4e, 0x6a, 0x84, 0x2a, 0x11, 0xda, 0x71, - 0x93, 0x6f, 0x18, 0xe4, 0x49, 0x38, 0x7c, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0xd1, - 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, 0x30, 0x05, - 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, - 0x18, 0x35, 0x0b, 0x30, 0x01, 0x20, 0x0c, 0x9a, 0x21, 0x58, 0x43, 0xb6, 0x04, 0x36, 0xd9, 0x60, 0xb1, 0xf1, 0x8c, 0x07, 0x5b, - 0xae, 0x3b, 0x9a, 0x1f, 0xc0, 0x81, 0x4c, 0xb7, 0xa9, 0x8d, 0xf6, 0xd5, 0x91, 0x70, 0x9f, 0x27, 0xe6, 0x30, 0x02, 0x20, 0x2f, - 0x78, 0x37, 0x79, 0x65, 0x09, 0xe4, 0x8b, 0x28, 0x5b, 0x80, 0xaf, 0x43, 0x38, 0x9f, 0x97, 0x00, 0x11, 0x4c, 0x69, 0x65, 0x19, - 0x13, 0x78, 0x35, 0x1b, 0x2f, 0x90, 0x6e, 0x0f, 0xc1, 0x3b, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x51, 0xa0, 0xe1, 0x27, 0xab, 0x59, 0xd7, 0x01, 0x24, 0x02, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, + 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, + 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x6c, 0x5b, 0x7c, 0x34, 0x1a, 0xd1, 0x95, 0xd2, 0x46, 0xfa, 0x0c, + 0x7d, 0xd6, 0x25, 0x43, 0x81, 0x94, 0x28, 0x5a, 0xaa, 0x8f, 0x13, 0x47, 0x3f, 0x7d, 0x61, 0x8f, 0xc9, 0xbd, 0x44, 0xf2, + 0xdd, 0x5e, 0xec, 0xd5, 0x71, 0xfa, 0xf0, 0x9c, 0x1c, 0x73, 0x68, 0x04, 0xd0, 0x85, 0x32, 0x16, 0x14, 0x74, 0x94, 0x4e, + 0x6a, 0x84, 0x2a, 0x11, 0xda, 0x71, 0x93, 0x6f, 0x18, 0xe4, 0x49, 0x38, 0x7c, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, + 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, 0xd9, 0x7c, 0x65, + 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, 0x30, 0x05, 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, + 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, 0x18, 0x30, 0x0b, 0x40, 0x0c, 0x9a, 0x21, 0x58, 0x43, 0xb6, 0x04, + 0x36, 0xd9, 0x60, 0xb1, 0xf1, 0x8c, 0x07, 0x5b, 0xae, 0x3b, 0x9a, 0x1f, 0xc0, 0x81, 0x4c, 0xb7, 0xa9, 0x8d, 0xf6, 0xd5, + 0x91, 0x70, 0x9f, 0x27, 0xe6, 0x2f, 0x78, 0x37, 0x79, 0x65, 0x09, 0xe4, 0x8b, 0x28, 0x5b, 0x80, 0xaf, 0x43, 0x38, 0x9f, + 0x97, 0x00, 0x11, 0x4c, 0x69, 0x65, 0x19, 0x13, 0x78, 0x35, 0x1b, 0x2f, 0x90, 0x6e, 0x0f, 0xc1, 0x3b, 0x18, }; extern const uint32_t sTestCert_Root01_Chip_Len = sizeof(sTestCert_Root01_Chip); @@ -360,20 +360,20 @@ Aath/pACj2cfF4oZcTG9DetAh0gvcSrdDQ== */ extern const uint8_t sTestCert_Root02_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x3d, 0x65, 0x91, 0x63, 0xec, 0x92, 0x16, 0x1b, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x14, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x14, 0x02, 0x00, 0x00, - 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, - 0x01, 0x30, 0x09, 0x41, 0x04, 0xbe, 0xdc, 0x28, 0x48, 0x4d, 0x86, 0x14, 0xdf, 0xa4, 0xc8, 0x71, 0x86, 0x81, 0x3b, 0x4b, 0x61, - 0xa8, 0xcd, 0xbf, 0xa6, 0x67, 0x99, 0x2f, 0xc5, 0x03, 0xe6, 0xbc, 0xeb, 0xbc, 0x85, 0x17, 0x9a, 0x3e, 0x05, 0x1b, 0x50, 0x0b, - 0xb1, 0xcf, 0x01, 0xab, 0x61, 0xfe, 0x90, 0x02, 0x8f, 0x67, 0x1f, 0x17, 0x8a, 0x19, 0x71, 0x31, 0xbd, 0x0d, 0xeb, 0x40, 0x87, - 0x48, 0x2f, 0x71, 0x2a, 0xdd, 0x0d, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x0b, 0xc5, - 0xfe, 0xd2, 0xaa, 0xb0, 0x4f, 0x20, 0x2c, 0xb3, 0x36, 0xa3, 0xd2, 0xcf, 0x66, 0x5a, 0x20, 0x1e, 0xff, 0xba, 0x30, 0x05, 0x14, - 0x0b, 0xc5, 0xfe, 0xd2, 0xaa, 0xb0, 0x4f, 0x20, 0x2c, 0xb3, 0x36, 0xa3, 0xd2, 0xcf, 0x66, 0x5a, 0x20, 0x1e, 0xff, 0xba, 0x18, - 0x35, 0x0b, 0x30, 0x01, 0x20, 0x37, 0x64, 0x21, 0xf0, 0x62, 0xbf, 0x16, 0x40, 0xdb, 0x1b, 0xd7, 0x1c, 0x06, 0x9a, 0xc8, 0xa9, - 0xcf, 0xce, 0xf7, 0xf2, 0xaf, 0xd0, 0x78, 0x6f, 0x0c, 0x9d, 0x5d, 0x9d, 0x6d, 0xc2, 0x6d, 0xd8, 0x30, 0x02, 0x20, 0x78, 0x78, - 0xaa, 0xa4, 0xed, 0x1e, 0xb8, 0x45, 0x03, 0xa3, 0x8f, 0xa4, 0x43, 0xce, 0x22, 0x9e, 0x47, 0x48, 0x0d, 0x36, 0x18, 0xd1, 0x69, - 0xa4, 0xa3, 0xaf, 0x72, 0x9e, 0x9f, 0x25, 0x4b, 0xfd, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x3d, 0x65, 0x91, 0x63, 0xec, 0x92, 0x16, 0x1b, 0x24, 0x02, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xb0, 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x14, + 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, + 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0xbe, 0xdc, 0x28, 0x48, 0x4d, 0x86, 0x14, 0xdf, 0xa4, 0xc8, 0x71, + 0x86, 0x81, 0x3b, 0x4b, 0x61, 0xa8, 0xcd, 0xbf, 0xa6, 0x67, 0x99, 0x2f, 0xc5, 0x03, 0xe6, 0xbc, 0xeb, 0xbc, 0x85, 0x17, + 0x9a, 0x3e, 0x05, 0x1b, 0x50, 0x0b, 0xb1, 0xcf, 0x01, 0xab, 0x61, 0xfe, 0x90, 0x02, 0x8f, 0x67, 0x1f, 0x17, 0x8a, 0x19, + 0x71, 0x31, 0xbd, 0x0d, 0xeb, 0x40, 0x87, 0x48, 0x2f, 0x71, 0x2a, 0xdd, 0x0d, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, + 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x0b, 0xc5, 0xfe, 0xd2, 0xaa, 0xb0, 0x4f, 0x20, 0x2c, 0xb3, 0x36, 0xa3, 0xd2, 0xcf, + 0x66, 0x5a, 0x20, 0x1e, 0xff, 0xba, 0x30, 0x05, 0x14, 0x0b, 0xc5, 0xfe, 0xd2, 0xaa, 0xb0, 0x4f, 0x20, 0x2c, 0xb3, 0x36, + 0xa3, 0xd2, 0xcf, 0x66, 0x5a, 0x20, 0x1e, 0xff, 0xba, 0x18, 0x30, 0x0b, 0x40, 0x37, 0x64, 0x21, 0xf0, 0x62, 0xbf, 0x16, + 0x40, 0xdb, 0x1b, 0xd7, 0x1c, 0x06, 0x9a, 0xc8, 0xa9, 0xcf, 0xce, 0xf7, 0xf2, 0xaf, 0xd0, 0x78, 0x6f, 0x0c, 0x9d, 0x5d, + 0x9d, 0x6d, 0xc2, 0x6d, 0xd8, 0x78, 0x78, 0xaa, 0xa4, 0xed, 0x1e, 0xb8, 0x45, 0x03, 0xa3, 0x8f, 0xa4, 0x43, 0xce, 0x22, + 0x9e, 0x47, 0x48, 0x0d, 0x36, 0x18, 0xd1, 0x69, 0xa4, 0xa3, 0xaf, 0x72, 0x9e, 0x9f, 0x25, 0x4b, 0xfd, 0x18, }; extern const uint32_t sTestCert_Root02_Chip_Len = sizeof(sTestCert_Root02_Chip); @@ -487,19 +487,19 @@ Ib43ETP868C79G+0cUVYAJkWG+mscnL1Pw== */ extern const uint8_t sTestCert_ICA01_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x7d, 0x1c, 0x93, 0x93, 0xc3, 0x39, 0xef, 0x09, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, - 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24, - 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x4a, 0x31, 0x72, 0x17, 0x59, 0x96, 0xee, 0x14, 0x7b, 0x73, 0x8a, 0x47, 0x1c, 0x51, 0x24, - 0x10, 0xe8, 0x9a, 0x7e, 0xb9, 0x42, 0x7f, 0xbc, 0x05, 0xfc, 0xd6, 0x99, 0xbf, 0xa7, 0x4e, 0xa6, 0xe7, 0x16, 0x34, 0x60, 0xdb, - 0xea, 0xf9, 0x81, 0x21, 0xbe, 0x37, 0x11, 0x33, 0xfc, 0xeb, 0xc0, 0xbb, 0xf4, 0x6f, 0xb4, 0x71, 0x45, 0x58, 0x00, 0x99, 0x16, - 0x1b, 0xe9, 0xac, 0x72, 0x72, 0xf5, 0x3f, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x74, - 0x2b, 0xa9, 0x9c, 0xaf, 0x17, 0xc7, 0x90, 0x2b, 0x71, 0x3d, 0x8b, 0x24, 0x59, 0x15, 0x63, 0x35, 0x3c, 0x3b, 0xa4, 0x30, 0x05, - 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, - 0x18, 0x35, 0x0b, 0x30, 0x01, 0x21, 0x00, 0xa8, 0x99, 0xd6, 0xd4, 0x98, 0x10, 0x19, 0x51, 0xeb, 0x86, 0xe2, 0x56, 0xb3, 0x8e, - 0x35, 0xfe, 0x69, 0x0b, 0xa6, 0x4f, 0xb2, 0x03, 0x23, 0x9a, 0x76, 0x6d, 0x96, 0x47, 0xa3, 0xba, 0x0a, 0xe9, 0x30, 0x02, 0x20, - 0x56, 0x62, 0xcb, 0xfe, 0x9e, 0x41, 0x41, 0xb3, 0x8d, 0xc4, 0x58, 0xb5, 0x95, 0x84, 0x8d, 0x21, 0x72, 0xfa, 0x57, 0x75, 0x1e, - 0x90, 0xb6, 0x6d, 0xdc, 0xb1, 0x9d, 0xf9, 0xc0, 0xe1, 0x1d, 0x7e, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x7d, 0x1c, 0x93, 0x93, 0xc3, 0x39, 0xef, 0x09, 0x24, 0x02, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, + 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, + 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x4a, 0x31, 0x72, 0x17, 0x59, 0x96, 0xee, 0x14, 0x7b, 0x73, 0x8a, + 0x47, 0x1c, 0x51, 0x24, 0x10, 0xe8, 0x9a, 0x7e, 0xb9, 0x42, 0x7f, 0xbc, 0x05, 0xfc, 0xd6, 0x99, 0xbf, 0xa7, 0x4e, 0xa6, + 0xe7, 0x16, 0x34, 0x60, 0xdb, 0xea, 0xf9, 0x81, 0x21, 0xbe, 0x37, 0x11, 0x33, 0xfc, 0xeb, 0xc0, 0xbb, 0xf4, 0x6f, 0xb4, + 0x71, 0x45, 0x58, 0x00, 0x99, 0x16, 0x1b, 0xe9, 0xac, 0x72, 0x72, 0xf5, 0x3f, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, + 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x74, 0x2b, 0xa9, 0x9c, 0xaf, 0x17, 0xc7, 0x90, 0x2b, 0x71, 0x3d, 0x8b, 0x24, 0x59, + 0x15, 0x63, 0x35, 0x3c, 0x3b, 0xa4, 0x30, 0x05, 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, + 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, 0x18, 0x30, 0x0b, 0x40, 0xa8, 0x99, 0xd6, 0xd4, 0x98, 0x10, 0x19, + 0x51, 0xeb, 0x86, 0xe2, 0x56, 0xb3, 0x8e, 0x35, 0xfe, 0x69, 0x0b, 0xa6, 0x4f, 0xb2, 0x03, 0x23, 0x9a, 0x76, 0x6d, 0x96, + 0x47, 0xa3, 0xba, 0x0a, 0xe9, 0x56, 0x62, 0xcb, 0xfe, 0x9e, 0x41, 0x41, 0xb3, 0x8d, 0xc4, 0x58, 0xb5, 0x95, 0x84, 0x8d, + 0x21, 0x72, 0xfa, 0x57, 0x75, 0x1e, 0x90, 0xb6, 0x6d, 0xdc, 0xb1, 0x9d, 0xf9, 0xc0, 0xe1, 0x1d, 0x7e, 0x18, }; extern const uint32_t sTestCert_ICA01_Chip_Len = sizeof(sTestCert_ICA01_Chip); @@ -611,20 +611,20 @@ GjD6VAYat27ZE4z9vOL053Hln/7evJorNQ== */ extern const uint8_t sTestCert_ICA02_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x56, 0x4b, 0x75, 0x33, 0x24, 0x53, 0xe3, 0xf7, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x14, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, - 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x04, 0x00, 0x00, - 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, - 0x01, 0x30, 0x09, 0x41, 0x04, 0x43, 0x0b, 0x77, 0x1a, 0x3c, 0xfd, 0x2f, 0x8b, 0x28, 0x2e, 0xc8, 0x8e, 0x32, 0x80, 0xbb, 0xc6, - 0x66, 0x50, 0xbf, 0xb6, 0xd7, 0x44, 0x6f, 0x5a, 0x3c, 0x7f, 0x16, 0xb0, 0xac, 0xa6, 0x19, 0x89, 0x16, 0x42, 0xe0, 0x18, 0xa1, - 0x25, 0x94, 0x1a, 0x30, 0xfa, 0x54, 0x06, 0x1a, 0xb7, 0x6e, 0xd9, 0x13, 0x8c, 0xfd, 0xbc, 0xe2, 0xf4, 0xe7, 0x71, 0xe5, 0x9f, - 0xfe, 0xde, 0xbc, 0x9a, 0x2b, 0x35, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0xf0, 0x51, - 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x30, 0x05, 0x14, - 0x0b, 0xc5, 0xfe, 0xd2, 0xaa, 0xb0, 0x4f, 0x20, 0x2c, 0xb3, 0x36, 0xa3, 0xd2, 0xcf, 0x66, 0x5a, 0x20, 0x1e, 0xff, 0xba, 0x18, - 0x35, 0x0b, 0x30, 0x01, 0x20, 0x19, 0xef, 0xb1, 0x78, 0x31, 0x5f, 0x88, 0xe8, 0xf0, 0x3f, 0x90, 0xba, 0x74, 0xcb, 0x18, 0xf0, - 0x1a, 0x47, 0x27, 0xb3, 0x60, 0xea, 0x7d, 0x2b, 0xeb, 0x1d, 0x70, 0xa8, 0x1f, 0xb5, 0x65, 0x09, 0x30, 0x02, 0x20, 0x6a, 0x94, - 0x07, 0x47, 0xf5, 0x2c, 0xc7, 0x62, 0xa4, 0xd6, 0x12, 0x45, 0xa7, 0xbd, 0xaa, 0x49, 0x70, 0xdf, 0x10, 0x0b, 0x4c, 0xc3, 0x9f, - 0x6b, 0x1a, 0x45, 0x9e, 0xe5, 0xfd, 0x94, 0x4a, 0x37, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x56, 0x4b, 0x75, 0x33, 0x24, 0x53, 0xe3, 0xf7, 0x24, 0x02, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x02, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xb0, 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, + 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, + 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x43, 0x0b, 0x77, 0x1a, 0x3c, 0xfd, 0x2f, 0x8b, 0x28, 0x2e, 0xc8, + 0x8e, 0x32, 0x80, 0xbb, 0xc6, 0x66, 0x50, 0xbf, 0xb6, 0xd7, 0x44, 0x6f, 0x5a, 0x3c, 0x7f, 0x16, 0xb0, 0xac, 0xa6, 0x19, + 0x89, 0x16, 0x42, 0xe0, 0x18, 0xa1, 0x25, 0x94, 0x1a, 0x30, 0xfa, 0x54, 0x06, 0x1a, 0xb7, 0x6e, 0xd9, 0x13, 0x8c, 0xfd, + 0xbc, 0xe2, 0xf4, 0xe7, 0x71, 0xe5, 0x9f, 0xfe, 0xde, 0xbc, 0x9a, 0x2b, 0x35, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, + 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0xf0, 0x51, 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, + 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x30, 0x05, 0x14, 0x0b, 0xc5, 0xfe, 0xd2, 0xaa, 0xb0, 0x4f, 0x20, 0x2c, 0xb3, 0x36, + 0xa3, 0xd2, 0xcf, 0x66, 0x5a, 0x20, 0x1e, 0xff, 0xba, 0x18, 0x30, 0x0b, 0x40, 0x19, 0xef, 0xb1, 0x78, 0x31, 0x5f, 0x88, + 0xe8, 0xf0, 0x3f, 0x90, 0xba, 0x74, 0xcb, 0x18, 0xf0, 0x1a, 0x47, 0x27, 0xb3, 0x60, 0xea, 0x7d, 0x2b, 0xeb, 0x1d, 0x70, + 0xa8, 0x1f, 0xb5, 0x65, 0x09, 0x6a, 0x94, 0x07, 0x47, 0xf5, 0x2c, 0xc7, 0x62, 0xa4, 0xd6, 0x12, 0x45, 0xa7, 0xbd, 0xaa, + 0x49, 0x70, 0xdf, 0x10, 0x0b, 0x4c, 0xc3, 0x9f, 0x6b, 0x1a, 0x45, 0x9e, 0xe5, 0xfd, 0x94, 0x4a, 0x37, 0x18, }; extern const uint32_t sTestCert_ICA02_Chip_Len = sizeof(sTestCert_ICA02_Chip); @@ -738,19 +738,19 @@ h+jA/t/f8ikLF7ix4JSM+620ygWkRgJQaw== */ extern const uint8_t sTestCert_ICA01_1_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x07, 0x8b, 0x4c, 0x12, 0x8a, 0xa4, 0x89, 0xb6, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, - 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x05, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, 0x07, 0x01, 0x24, - 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x94, 0xe7, 0x80, 0xc1, 0x83, 0xef, 0x61, 0xca, 0xe6, 0x3b, 0x80, 0x35, 0xf4, 0x85, 0x62, - 0x6a, 0x07, 0xea, 0x0e, 0x32, 0xf2, 0x67, 0x2a, 0xc4, 0x56, 0xb6, 0x3a, 0xf2, 0xa3, 0xd1, 0x80, 0x6d, 0xcf, 0x32, 0x1d, 0x01, - 0x40, 0x48, 0x38, 0x87, 0xe8, 0xc0, 0xfe, 0xdf, 0xdf, 0xf2, 0x29, 0x0b, 0x17, 0xb8, 0xb1, 0xe0, 0x94, 0x8c, 0xfb, 0xad, 0xb4, - 0xca, 0x05, 0xa4, 0x46, 0x02, 0x50, 0x6b, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x13, - 0x8b, 0xb2, 0x32, 0x94, 0x4d, 0xdf, 0x8c, 0xcd, 0x24, 0x30, 0x1f, 0xeb, 0x70, 0x5d, 0x72, 0xb3, 0x24, 0xf0, 0x68, 0x30, 0x05, - 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, - 0x18, 0x35, 0x0b, 0x30, 0x01, 0x21, 0x00, 0xab, 0x66, 0xfc, 0xd6, 0x9f, 0x78, 0x1e, 0x03, 0xfb, 0x5b, 0x54, 0x48, 0x39, 0x26, - 0x68, 0x1e, 0xdf, 0xda, 0x61, 0x30, 0xdd, 0xc0, 0x87, 0xc9, 0xf8, 0x16, 0x76, 0xad, 0x7b, 0x74, 0xfc, 0xc5, 0x30, 0x02, 0x20, - 0x3b, 0xf5, 0x5f, 0x67, 0x59, 0x37, 0xc4, 0x68, 0x34, 0xa5, 0x75, 0x62, 0xc3, 0xc1, 0xac, 0xf0, 0x80, 0x1e, 0xfd, 0xc4, 0x2c, - 0x6e, 0xd3, 0xbc, 0x5d, 0x82, 0xc3, 0xb3, 0x35, 0x1e, 0xda, 0x47, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x07, 0x8b, 0x4c, 0x12, 0x8a, 0xa4, 0x89, 0xb6, 0x24, 0x02, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, + 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x13, 0x05, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x24, + 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x94, 0xe7, 0x80, 0xc1, 0x83, 0xef, 0x61, 0xca, 0xe6, 0x3b, 0x80, + 0x35, 0xf4, 0x85, 0x62, 0x6a, 0x07, 0xea, 0x0e, 0x32, 0xf2, 0x67, 0x2a, 0xc4, 0x56, 0xb6, 0x3a, 0xf2, 0xa3, 0xd1, 0x80, + 0x6d, 0xcf, 0x32, 0x1d, 0x01, 0x40, 0x48, 0x38, 0x87, 0xe8, 0xc0, 0xfe, 0xdf, 0xdf, 0xf2, 0x29, 0x0b, 0x17, 0xb8, 0xb1, + 0xe0, 0x94, 0x8c, 0xfb, 0xad, 0xb4, 0xca, 0x05, 0xa4, 0x46, 0x02, 0x50, 0x6b, 0x37, 0x0a, 0x35, 0x01, 0x29, 0x01, 0x18, + 0x24, 0x02, 0x60, 0x30, 0x04, 0x14, 0x13, 0x8b, 0xb2, 0x32, 0x94, 0x4d, 0xdf, 0x8c, 0xcd, 0x24, 0x30, 0x1f, 0xeb, 0x70, + 0x5d, 0x72, 0xb3, 0x24, 0xf0, 0x68, 0x30, 0x05, 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, + 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, 0x18, 0x30, 0x0b, 0x40, 0xab, 0x66, 0xfc, 0xd6, 0x9f, 0x78, 0x1e, + 0x03, 0xfb, 0x5b, 0x54, 0x48, 0x39, 0x26, 0x68, 0x1e, 0xdf, 0xda, 0x61, 0x30, 0xdd, 0xc0, 0x87, 0xc9, 0xf8, 0x16, 0x76, + 0xad, 0x7b, 0x74, 0xfc, 0xc5, 0x3b, 0xf5, 0x5f, 0x67, 0x59, 0x37, 0xc4, 0x68, 0x34, 0xa5, 0x75, 0x62, 0xc3, 0xc1, 0xac, + 0xf0, 0x80, 0x1e, 0xfd, 0xc4, 0x2c, 0x6e, 0xd3, 0xbc, 0x5d, 0x82, 0xc3, 0xb3, 0x35, 0x1e, 0xda, 0x47, 0x18, }; extern const uint32_t sTestCert_ICA01_1_Chip_Len = sizeof(sTestCert_ICA01_1_Chip); @@ -873,10 +873,10 @@ extern const uint8_t sTestCert_FWSign01_Chip[] = { 0xae, 0xe4, 0x44, 0x0d, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x01, 0x36, 0x03, 0x04, 0x03, 0x18, 0x30, 0x04, 0x14, 0xaf, 0xba, 0x77, 0x6d, 0x13, 0xd0, 0x5d, 0x3c, 0x2d, 0xae, 0xcb, 0x76, 0xe9, 0xcd, 0xbb, 0x1a, 0x40, 0x03, 0x3e, 0xf1, 0x30, 0x05, 0x14, 0x13, 0x8b, 0xb2, 0x32, 0x94, 0x4d, 0xdf, 0x8c, 0xcd, 0x24, 0x30, 0x1f, 0xeb, 0x70, 0x5d, 0x72, 0xb3, 0x24, - 0xf0, 0x68, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x21, 0x00, 0x96, 0x2c, 0x9f, 0xfa, 0xb5, 0xcb, 0xb3, 0xd7, 0x07, 0x6e, 0xdf, 0xbd, - 0xb2, 0x12, 0xa1, 0xe9, 0x0f, 0x49, 0x4e, 0x20, 0x60, 0x72, 0xf7, 0xb3, 0xd4, 0x97, 0xe4, 0xaf, 0xe3, 0x07, 0xb7, 0xfe, 0x30, - 0x02, 0x21, 0x00, 0xf0, 0x99, 0x78, 0x6f, 0xcb, 0xd9, 0xf4, 0x6e, 0x82, 0x66, 0x1e, 0xb0, 0x30, 0x2d, 0x95, 0x64, 0xb2, 0xcf, - 0x5f, 0xc4, 0x69, 0x58, 0xe5, 0xf2, 0xcb, 0x07, 0x01, 0x90, 0xa7, 0x9a, 0xae, 0x4f, 0x18, 0x18, + 0xf0, 0x68, 0x18, 0x30, 0x0b, 0x40, 0x96, 0x2c, 0x9f, 0xfa, 0xb5, 0xcb, 0xb3, 0xd7, 0x07, 0x6e, 0xdf, 0xbd, 0xb2, 0x12, 0xa1, + 0xe9, 0x0f, 0x49, 0x4e, 0x20, 0x60, 0x72, 0xf7, 0xb3, 0xd4, 0x97, 0xe4, 0xaf, 0xe3, 0x07, 0xb7, 0xfe, 0xf0, 0x99, 0x78, 0x6f, + 0xcb, 0xd9, 0xf4, 0x6e, 0x82, 0x66, 0x1e, 0xb0, 0x30, 0x2d, 0x95, 0x64, 0xb2, 0xcf, 0x5f, 0xc4, 0x69, 0x58, 0xe5, 0xf2, 0xcb, + 0x07, 0x01, 0x90, 0xa7, 0x9a, 0xae, 0x4f, 0x18, }; extern const uint32_t sTestCert_FWSign01_Chip_Len = sizeof(sTestCert_FWSign01_Chip); @@ -993,20 +993,20 @@ hsZj7ph5VVwTc8QiklGUvoutEidf4jbpkA== */ extern const uint8_t sTestCert_Node01_01_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x00, 0xb8, 0x48, 0x05, 0xce, 0xec, 0x05, 0x52, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, - 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x1c, 0xf6, 0xa6, 0xfb, 0xba, - 0x3c, 0x49, 0x0f, 0x40, 0xcd, 0x59, 0xd7, 0xf2, 0xbb, 0x40, 0xfd, 0xac, 0x30, 0xbd, 0x51, 0x2f, 0x8a, 0xfe, 0x0d, 0xed, 0xca, - 0x12, 0x78, 0x9c, 0x8f, 0x71, 0xb4, 0x7e, 0x83, 0xbf, 0xd0, 0xa7, 0x86, 0x2d, 0x86, 0xc6, 0x63, 0xee, 0x98, 0x79, 0x55, 0x5c, - 0x13, 0x73, 0xc4, 0x22, 0x92, 0x51, 0x94, 0xbe, 0x8b, 0xad, 0x12, 0x27, 0x5f, 0xe2, 0x36, 0xe9, 0x90, 0x37, 0x0a, 0x35, 0x01, - 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0xb2, 0x75, 0x2c, 0x21, 0x8e, - 0xa9, 0x3e, 0x5e, 0x87, 0xa5, 0xbd, 0x5e, 0xc7, 0x39, 0xbc, 0xaa, 0x1e, 0xbe, 0x56, 0x4c, 0x30, 0x05, 0x14, 0x74, 0x2b, 0xa9, - 0x9c, 0xaf, 0x17, 0xc7, 0x90, 0x2b, 0x71, 0x3d, 0x8b, 0x24, 0x59, 0x15, 0x63, 0x35, 0x3c, 0x3b, 0xa4, 0x18, 0x35, 0x0b, 0x30, - 0x01, 0x20, 0x61, 0x82, 0x8c, 0x17, 0xf9, 0x70, 0x61, 0x32, 0x6d, 0x46, 0x23, 0x81, 0x31, 0xa6, 0x30, 0x5c, 0x06, 0x82, 0x27, - 0x24, 0xe4, 0xf8, 0x95, 0xcf, 0x80, 0x83, 0x69, 0x82, 0x11, 0x9e, 0xc1, 0x16, 0x30, 0x02, 0x21, 0x00, 0xfc, 0xfc, 0xc6, 0x52, - 0xd0, 0x7f, 0x5a, 0x99, 0x74, 0x13, 0x01, 0xc5, 0x98, 0xed, 0x6f, 0x4f, 0x7d, 0x36, 0xbc, 0xc5, 0xcd, 0x4c, 0x5b, 0x34, 0x80, - 0xe8, 0xcb, 0xd5, 0x3c, 0x87, 0xf8, 0xd3, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x00, 0xb8, 0x48, 0x05, 0xce, 0xec, 0x05, 0x52, 0x24, 0x02, + 0x01, 0x37, 0x03, 0x27, 0x13, 0x03, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, + 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x01, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, + 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x1c, + 0xf6, 0xa6, 0xfb, 0xba, 0x3c, 0x49, 0x0f, 0x40, 0xcd, 0x59, 0xd7, 0xf2, 0xbb, 0x40, 0xfd, 0xac, 0x30, 0xbd, 0x51, 0x2f, + 0x8a, 0xfe, 0x0d, 0xed, 0xca, 0x12, 0x78, 0x9c, 0x8f, 0x71, 0xb4, 0x7e, 0x83, 0xbf, 0xd0, 0xa7, 0x86, 0x2d, 0x86, 0xc6, + 0x63, 0xee, 0x98, 0x79, 0x55, 0x5c, 0x13, 0x73, 0xc4, 0x22, 0x92, 0x51, 0x94, 0xbe, 0x8b, 0xad, 0x12, 0x27, 0x5f, 0xe2, + 0x36, 0xe9, 0x90, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, + 0x30, 0x04, 0x14, 0xb2, 0x75, 0x2c, 0x21, 0x8e, 0xa9, 0x3e, 0x5e, 0x87, 0xa5, 0xbd, 0x5e, 0xc7, 0x39, 0xbc, 0xaa, 0x1e, + 0xbe, 0x56, 0x4c, 0x30, 0x05, 0x14, 0x74, 0x2b, 0xa9, 0x9c, 0xaf, 0x17, 0xc7, 0x90, 0x2b, 0x71, 0x3d, 0x8b, 0x24, 0x59, + 0x15, 0x63, 0x35, 0x3c, 0x3b, 0xa4, 0x18, 0x30, 0x0b, 0x40, 0x61, 0x82, 0x8c, 0x17, 0xf9, 0x70, 0x61, 0x32, 0x6d, 0x46, + 0x23, 0x81, 0x31, 0xa6, 0x30, 0x5c, 0x06, 0x82, 0x27, 0x24, 0xe4, 0xf8, 0x95, 0xcf, 0x80, 0x83, 0x69, 0x82, 0x11, 0x9e, + 0xc1, 0x16, 0xfc, 0xfc, 0xc6, 0x52, 0xd0, 0x7f, 0x5a, 0x99, 0x74, 0x13, 0x01, 0xc5, 0x98, 0xed, 0x6f, 0x4f, 0x7d, 0x36, + 0xbc, 0xc5, 0xcd, 0x4c, 0x5b, 0x34, 0x80, 0xe8, 0xcb, 0xd5, 0x3c, 0x87, 0xf8, 0xd3, 0x18, }; extern const uint32_t sTestCert_Node01_01_Chip_Len = sizeof(sTestCert_Node01_01_Chip); @@ -1124,20 +1124,20 @@ VaWWZAbPYj1YP0DASmMoPRHfE7F9KMvcRA== */ extern const uint8_t sTestCert_Node01_02_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x3d, 0xe1, 0xb6, 0x42, 0x62, 0xca, 0xc6, 0xcc, 0x24, 0x02, 0x01, - 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, - 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x02, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, - 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x91, 0x30, 0x22, 0x51, 0xab, - 0xe1, 0xe6, 0xb0, 0xea, 0x26, 0x6e, 0xe7, 0xce, 0x00, 0x5e, 0x89, 0xaa, 0x4e, 0x4d, 0x28, 0xc3, 0x01, 0x15, 0xb8, 0xec, 0xf3, - 0x6f, 0x1d, 0x33, 0x9c, 0x02, 0x16, 0xf3, 0xe9, 0x0d, 0xdd, 0xd9, 0x4a, 0x80, 0x55, 0xa5, 0x96, 0x64, 0x06, 0xcf, 0x62, 0x3d, - 0x58, 0x3f, 0x40, 0xc0, 0x4a, 0x63, 0x28, 0x3d, 0x11, 0xdf, 0x13, 0xb1, 0x7d, 0x28, 0xcb, 0xdc, 0x44, 0x37, 0x0a, 0x35, 0x01, - 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0xac, 0x71, 0x2a, 0xaf, 0x5e, - 0xa8, 0x73, 0xdd, 0x14, 0xe5, 0xb3, 0xd6, 0xc2, 0x9a, 0x75, 0xe0, 0xe8, 0x51, 0x8c, 0x0a, 0x30, 0x05, 0x14, 0xd1, 0x02, 0xdb, - 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, 0xd9, 0x7c, 0x65, 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, 0x18, 0x35, 0x0b, 0x30, - 0x01, 0x21, 0x00, 0xd1, 0xae, 0x60, 0x66, 0x7b, 0xbb, 0xe8, 0x5d, 0x25, 0xac, 0x80, 0x27, 0xd6, 0xc6, 0xb9, 0x66, 0x12, 0x7e, - 0x85, 0x5f, 0x34, 0x49, 0x0f, 0xf5, 0xbd, 0xea, 0x2e, 0x11, 0x07, 0x61, 0x8b, 0xc8, 0x30, 0x02, 0x20, 0x32, 0xa5, 0x61, 0xcd, - 0x38, 0x37, 0xf9, 0x69, 0xac, 0x70, 0xa7, 0x0b, 0x40, 0xd4, 0xb6, 0x5f, 0x49, 0xc9, 0x38, 0x81, 0x3d, 0x30, 0xc9, 0x43, 0x53, - 0x49, 0x49, 0xcd, 0x57, 0xce, 0x42, 0xe6, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x3d, 0xe1, 0xb6, 0x42, 0x62, 0xca, 0xc6, 0xcc, 0x24, 0x02, + 0x01, 0x37, 0x03, 0x27, 0x14, 0x01, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, + 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x02, 0x00, 0x01, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, + 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x91, + 0x30, 0x22, 0x51, 0xab, 0xe1, 0xe6, 0xb0, 0xea, 0x26, 0x6e, 0xe7, 0xce, 0x00, 0x5e, 0x89, 0xaa, 0x4e, 0x4d, 0x28, 0xc3, + 0x01, 0x15, 0xb8, 0xec, 0xf3, 0x6f, 0x1d, 0x33, 0x9c, 0x02, 0x16, 0xf3, 0xe9, 0x0d, 0xdd, 0xd9, 0x4a, 0x80, 0x55, 0xa5, + 0x96, 0x64, 0x06, 0xcf, 0x62, 0x3d, 0x58, 0x3f, 0x40, 0xc0, 0x4a, 0x63, 0x28, 0x3d, 0x11, 0xdf, 0x13, 0xb1, 0x7d, 0x28, + 0xcb, 0xdc, 0x44, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, + 0x30, 0x04, 0x14, 0xac, 0x71, 0x2a, 0xaf, 0x5e, 0xa8, 0x73, 0xdd, 0x14, 0xe5, 0xb3, 0xd6, 0xc2, 0x9a, 0x75, 0xe0, 0xe8, + 0x51, 0x8c, 0x0a, 0x30, 0x05, 0x14, 0xd1, 0x02, 0xdb, 0xcf, 0x02, 0x53, 0xf2, 0x5b, 0x10, 0xcc, 0x17, 0xd9, 0x7c, 0x65, + 0xf4, 0xc3, 0x43, 0x50, 0x22, 0x0d, 0x18, 0x30, 0x0b, 0x40, 0xd1, 0xae, 0x60, 0x66, 0x7b, 0xbb, 0xe8, 0x5d, 0x25, 0xac, + 0x80, 0x27, 0xd6, 0xc6, 0xb9, 0x66, 0x12, 0x7e, 0x85, 0x5f, 0x34, 0x49, 0x0f, 0xf5, 0xbd, 0xea, 0x2e, 0x11, 0x07, 0x61, + 0x8b, 0xc8, 0x32, 0xa5, 0x61, 0xcd, 0x38, 0x37, 0xf9, 0x69, 0xac, 0x70, 0xa7, 0x0b, 0x40, 0xd4, 0xb6, 0x5f, 0x49, 0xc9, + 0x38, 0x81, 0x3d, 0x30, 0xc9, 0x43, 0x53, 0x49, 0x49, 0xcd, 0x57, 0xce, 0x42, 0xe6, 0x18, }; extern const uint32_t sTestCert_Node01_02_Chip_Len = sizeof(sTestCert_Node01_02_Chip); @@ -1265,10 +1265,10 @@ extern const uint8_t sTestCert_Node02_01_Chip[] = { 0x79, 0x8b, 0x99, 0x9e, 0x56, 0xdd, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0xd2, 0x18, 0xfc, 0x1c, 0xfb, 0xfc, 0x1d, 0x8b, 0xf5, 0xf1, 0x8d, 0x91, 0xf8, 0xb3, 0xef, 0x5c, 0x03, 0x63, 0x60, 0x83, 0x30, 0x05, 0x14, 0xf0, 0x51, 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, - 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x20, 0x6d, 0x4e, 0x82, 0x97, 0x04, 0x37, 0x6a, 0x15, 0x7b, - 0x54, 0x19, 0x09, 0xa9, 0xe4, 0x37, 0x0a, 0x9d, 0xa2, 0xac, 0xc2, 0x60, 0xdc, 0x6d, 0x23, 0xa7, 0xbe, 0xe1, 0x18, 0xdb, 0x75, - 0x5a, 0x66, 0x30, 0x02, 0x20, 0x5e, 0x88, 0x66, 0x9f, 0x8f, 0xae, 0x49, 0x8b, 0xd2, 0x8d, 0x75, 0xf6, 0xb5, 0x8f, 0x85, 0xce, - 0x0c, 0xcb, 0x1b, 0x07, 0x49, 0x4b, 0x53, 0x4f, 0x92, 0x92, 0xef, 0x3b, 0x3a, 0x0b, 0xbe, 0x4f, 0x18, 0x18, + 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x30, 0x0b, 0x40, 0x6d, 0x4e, 0x82, 0x97, 0x04, 0x37, 0x6a, 0x15, 0x7b, 0x54, 0x19, + 0x09, 0xa9, 0xe4, 0x37, 0x0a, 0x9d, 0xa2, 0xac, 0xc2, 0x60, 0xdc, 0x6d, 0x23, 0xa7, 0xbe, 0xe1, 0x18, 0xdb, 0x75, 0x5a, 0x66, + 0x5e, 0x88, 0x66, 0x9f, 0x8f, 0xae, 0x49, 0x8b, 0xd2, 0x8d, 0x75, 0xf6, 0xb5, 0x8f, 0x85, 0xce, 0x0c, 0xcb, 0x1b, 0x07, 0x49, + 0x4b, 0x53, 0x4f, 0x92, 0x92, 0xef, 0x3b, 0x3a, 0x0b, 0xbe, 0x4f, 0x18, }; extern const uint32_t sTestCert_Node02_01_Chip_Len = sizeof(sTestCert_Node02_01_Chip); @@ -1397,10 +1397,10 @@ extern const uint8_t sTestCert_Node02_02_Chip[] = { 0x29, 0xfa, 0x79, 0xd8, 0x18, 0x04, 0x62, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0xc5, 0xd7, 0x07, 0xad, 0x40, 0x62, 0x88, 0xb6, 0xce, 0x7c, 0x69, 0xa8, 0x97, 0x78, 0x00, 0xf5, 0x91, 0x3c, 0x7f, 0xa8, 0x30, 0x05, 0x14, 0xf0, 0x51, 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, - 0xd4, 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x21, 0x00, 0x83, 0x31, 0xaa, 0xac, 0x34, 0x98, 0xd0, - 0x21, 0xa4, 0x43, 0x4d, 0x17, 0xb2, 0xce, 0x22, 0xe1, 0xf6, 0xa5, 0x4c, 0x7c, 0xf5, 0x30, 0xa3, 0xb4, 0x4a, 0xed, 0xfa, 0x0b, - 0xd3, 0x78, 0x67, 0x8d, 0x30, 0x02, 0x21, 0x00, 0x99, 0x13, 0xe1, 0x16, 0xb8, 0x07, 0x65, 0x9a, 0x50, 0xe0, 0xe9, 0x9a, 0x66, - 0x48, 0xd2, 0x8c, 0x4e, 0xbd, 0xae, 0xaf, 0x0d, 0xf2, 0x34, 0x3b, 0x43, 0xad, 0x81, 0xdb, 0x60, 0x41, 0xc4, 0x00, 0x18, 0x18, + 0xd4, 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x30, 0x0b, 0x40, 0x83, 0x31, 0xaa, 0xac, 0x34, 0x98, 0xd0, 0x21, 0xa4, 0x43, + 0x4d, 0x17, 0xb2, 0xce, 0x22, 0xe1, 0xf6, 0xa5, 0x4c, 0x7c, 0xf5, 0x30, 0xa3, 0xb4, 0x4a, 0xed, 0xfa, 0x0b, 0xd3, 0x78, 0x67, + 0x8d, 0x99, 0x13, 0xe1, 0x16, 0xb8, 0x07, 0x65, 0x9a, 0x50, 0xe0, 0xe9, 0x9a, 0x66, 0x48, 0xd2, 0x8c, 0x4e, 0xbd, 0xae, 0xaf, + 0x0d, 0xf2, 0x34, 0x3b, 0x43, 0xad, 0x81, 0xdb, 0x60, 0x41, 0xc4, 0x00, 0x18, }; extern const uint32_t sTestCert_Node02_02_Chip_Len = sizeof(sTestCert_Node02_02_Chip); @@ -1533,10 +1533,10 @@ extern const uint8_t sTestCert_Node02_03_Chip[] = { 0x8b, 0x6d, 0xd4, 0xb1, 0xe3, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0x8d, 0x5e, 0x1a, 0xac, 0x04, 0x06, 0x8a, 0xb5, 0x1c, 0x19, 0xd9, 0x13, 0x13, 0x33, 0x46, 0xae, 0x76, 0x0c, 0xaa, 0xf1, 0x30, 0x05, 0x14, 0xf0, 0x51, 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, 0xe3, - 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x21, 0x00, 0xf1, 0x06, 0x9e, 0xd6, 0x63, 0x27, 0x13, 0x7f, 0x11, - 0xab, 0x97, 0x4d, 0x67, 0xc0, 0x2c, 0xc5, 0xa1, 0x91, 0x41, 0x03, 0x4d, 0xfb, 0xb2, 0xec, 0x97, 0xc3, 0x27, 0xf0, 0x83, 0xc3, - 0xef, 0x21, 0x30, 0x02, 0x21, 0x00, 0x9f, 0x40, 0x5f, 0x64, 0x52, 0x58, 0x37, 0xaa, 0x43, 0x6c, 0x23, 0x05, 0x34, 0x12, 0xd2, - 0x48, 0xfd, 0xed, 0x4a, 0xac, 0xdd, 0x97, 0x1b, 0xae, 0x37, 0x82, 0xb1, 0x88, 0x46, 0x32, 0x24, 0x93, 0x18, 0x18, + 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x30, 0x0b, 0x40, 0xf1, 0x06, 0x9e, 0xd6, 0x63, 0x27, 0x13, 0x7f, 0x11, 0xab, 0x97, 0x4d, + 0x67, 0xc0, 0x2c, 0xc5, 0xa1, 0x91, 0x41, 0x03, 0x4d, 0xfb, 0xb2, 0xec, 0x97, 0xc3, 0x27, 0xf0, 0x83, 0xc3, 0xef, 0x21, 0x9f, + 0x40, 0x5f, 0x64, 0x52, 0x58, 0x37, 0xaa, 0x43, 0x6c, 0x23, 0x05, 0x34, 0x12, 0xd2, 0x48, 0xfd, 0xed, 0x4a, 0xac, 0xdd, 0x97, + 0x1b, 0xae, 0x37, 0x82, 0xb1, 0x88, 0x46, 0x32, 0x24, 0x93, 0x18, }; extern const uint32_t sTestCert_Node02_03_Chip_Len = sizeof(sTestCert_Node02_03_Chip); @@ -1670,10 +1670,10 @@ extern const uint8_t sTestCert_Node02_04_Chip[] = { 0xca, 0x1a, 0xdf, 0xd1, 0xcc, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0xf5, 0x17, 0xe0, 0x5e, 0xcb, 0xe6, 0x13, 0x78, 0x5d, 0x06, 0x4f, 0x34, 0x19, 0x43, 0x8d, 0xac, 0xd1, 0x10, 0x62, 0x74, 0x30, 0x05, 0x14, 0xf0, 0x51, 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, 0xe3, - 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x21, 0x00, 0xd9, 0x09, 0x5c, 0x7c, 0xdf, 0x29, 0x01, 0x3c, 0x3d, - 0x07, 0x9c, 0xcd, 0x8c, 0x3c, 0x99, 0x45, 0xa7, 0xbe, 0x5d, 0xc2, 0xcd, 0x67, 0x3a, 0x00, 0xa5, 0x9a, 0xe4, 0x97, 0xe7, 0xcd, - 0xfc, 0xa7, 0x30, 0x02, 0x21, 0x00, 0xd5, 0xb4, 0xdb, 0x41, 0x2e, 0x09, 0x15, 0x8f, 0x0f, 0xc6, 0x9b, 0x5d, 0x47, 0xa8, 0xb9, - 0xb4, 0x83, 0x24, 0xf6, 0xa6, 0x78, 0xb7, 0x00, 0x50, 0x5c, 0xcf, 0x6f, 0x86, 0x82, 0x08, 0x6f, 0x9a, 0x18, 0x18, + 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x18, 0x30, 0x0b, 0x40, 0xd9, 0x09, 0x5c, 0x7c, 0xdf, 0x29, 0x01, 0x3c, 0x3d, 0x07, 0x9c, 0xcd, + 0x8c, 0x3c, 0x99, 0x45, 0xa7, 0xbe, 0x5d, 0xc2, 0xcd, 0x67, 0x3a, 0x00, 0xa5, 0x9a, 0xe4, 0x97, 0xe7, 0xcd, 0xfc, 0xa7, 0xd5, + 0xb4, 0xdb, 0x41, 0x2e, 0x09, 0x15, 0x8f, 0x0f, 0xc6, 0x9b, 0x5d, 0x47, 0xa8, 0xb9, 0xb4, 0x83, 0x24, 0xf6, 0xa6, 0x78, 0xb7, + 0x00, 0x50, 0x5c, 0xcf, 0x6f, 0x86, 0x82, 0x08, 0x6f, 0x9a, 0x18, }; extern const uint32_t sTestCert_Node02_04_Chip_Len = sizeof(sTestCert_Node02_04_Chip); @@ -1811,11 +1811,10 @@ extern const uint8_t sTestCert_Node02_05_Chip[] = { 0x18, 0x30, 0x04, 0x14, 0xc5, 0x6c, 0xde, 0x42, 0x32, 0x3f, 0x75, 0x4d, 0xbe, 0x5a, 0x17, 0x4a, 0x3c, 0xf8, 0x8e, 0x93, 0x49, 0xcd, 0x53, 0x6a, 0x30, 0x05, 0x14, 0xf0, 0x51, 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x30, 0x06, 0x1a, 0x30, 0x18, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x11, 0x30, 0x0f, 0x81, 0x0d, - 0x74, 0x65, 0x73, 0x74, 0x40, 0x63, 0x68, 0x69, 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x20, 0x4a, 0x87, - 0x16, 0x8a, 0x67, 0xbd, 0xb2, 0xb2, 0x3f, 0x27, 0x8b, 0x8f, 0x43, 0x1f, 0xb3, 0x2d, 0xb7, 0x09, 0x1a, 0x20, 0xa3, 0x79, 0x7d, - 0xc6, 0x94, 0x73, 0xec, 0xcf, 0xb6, 0xa4, 0x29, 0xa9, 0x30, 0x02, 0x20, 0x18, 0x07, 0x96, 0x6b, 0x2c, 0x2d, 0x96, 0xaf, 0x72, - 0x5c, 0x9d, 0x43, 0x68, 0x09, 0x64, 0xa1, 0xdc, 0x93, 0xd2, 0xa4, 0xd1, 0x2d, 0x5a, 0xd4, 0x18, 0x39, 0x8d, 0xc8, 0x81, 0xb2, - 0x7e, 0xc7, 0x18, 0x18, + 0x74, 0x65, 0x73, 0x74, 0x40, 0x63, 0x68, 0x69, 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x18, 0x30, 0x0b, 0x40, 0x4a, 0x87, 0x16, 0x8a, + 0x67, 0xbd, 0xb2, 0xb2, 0x3f, 0x27, 0x8b, 0x8f, 0x43, 0x1f, 0xb3, 0x2d, 0xb7, 0x09, 0x1a, 0x20, 0xa3, 0x79, 0x7d, 0xc6, 0x94, + 0x73, 0xec, 0xcf, 0xb6, 0xa4, 0x29, 0xa9, 0x18, 0x07, 0x96, 0x6b, 0x2c, 0x2d, 0x96, 0xaf, 0x72, 0x5c, 0x9d, 0x43, 0x68, 0x09, + 0x64, 0xa1, 0xdc, 0x93, 0xd2, 0xa4, 0xd1, 0x2d, 0x5a, 0xd4, 0x18, 0x39, 0x8d, 0xc8, 0x81, 0xb2, 0x7e, 0xc7, 0x18, }; extern const uint32_t sTestCert_Node02_05_Chip_Len = sizeof(sTestCert_Node02_05_Chip); @@ -1947,24 +1946,23 @@ y3A4Ajxh4PeeqkBdFbFc1exBO3vDHd0/QQ== */ extern const uint8_t sTestCert_Node02_06_Chip[] = { - 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x2f, 0x9f, 0x06, 0x33, 0xe5, 0xd5, 0x96, 0x5c, 0x24, 0x02, - 0x01, 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xb0, 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, - 0x06, 0x00, 0x02, 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, - 0x07, 0x01, 0x24, 0x08, 0x01, 0x30, 0x09, 0x41, 0x04, 0x9f, 0x74, 0x66, 0x3c, 0x72, 0x0f, 0xd2, 0xe7, 0x73, 0xb9, 0x9e, - 0x1a, 0xfa, 0x9e, 0x6b, 0x15, 0x0c, 0xa3, 0x2b, 0xbc, 0xff, 0x90, 0x1b, 0x2f, 0xa7, 0xb7, 0x0d, 0xa8, 0x3a, 0x81, 0x3f, - 0x85, 0x71, 0x62, 0x00, 0x4c, 0x1d, 0xde, 0x48, 0xcb, 0x70, 0x38, 0x02, 0x3c, 0x61, 0xe0, 0xf7, 0x9e, 0xaa, 0x40, 0x5d, - 0x15, 0xb1, 0x5c, 0xd5, 0xec, 0x41, 0x3b, 0x7b, 0xc3, 0x1d, 0xdd, 0x3f, 0x41, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, - 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, 0x01, 0x18, 0x30, 0x04, 0x14, 0x41, 0x3e, 0x5a, 0xd0, 0x62, 0xee, 0x82, - 0xe7, 0x1b, 0xe9, 0x81, 0xaf, 0x2c, 0xab, 0x35, 0x65, 0x01, 0x2f, 0x4d, 0x74, 0x30, 0x05, 0x14, 0xf0, 0x51, 0x63, 0xff, - 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x30, 0x06, 0x1a, 0x30, - 0x18, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x11, 0x30, 0x0f, 0x81, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x40, 0x63, 0x68, 0x69, - 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x30, 0x06, 0x22, 0x30, 0x20, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, - 0x04, 0x14, 0x30, 0x12, 0x30, 0x10, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x04, 0x74, 0x65, - 0x73, 0x74, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x20, 0x78, 0x3c, 0xca, 0xb4, 0xe5, 0xe0, 0xfd, 0xd8, 0x9e, 0xf3, 0x5c, 0x11, - 0xfd, 0xda, 0x66, 0x27, 0x1e, 0x53, 0x12, 0xad, 0x50, 0x3f, 0x61, 0xef, 0x8c, 0xf4, 0x79, 0x42, 0xae, 0x8c, 0xf0, 0xde, - 0x30, 0x02, 0x21, 0x00, 0xc1, 0x60, 0x4e, 0xf2, 0xfb, 0x35, 0x1c, 0x26, 0x92, 0x73, 0x76, 0x4c, 0x3f, 0x38, 0xbf, 0x3a, - 0x50, 0x47, 0x5e, 0x64, 0xb0, 0x37, 0x42, 0xfd, 0x47, 0xc0, 0x17, 0xe7, 0x8b, 0x00, 0x2c, 0x93, 0x18, 0x18, + 0xd5, 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x30, 0x01, 0x08, 0x2f, 0x9f, 0x06, 0x33, 0xe5, 0xd5, 0x96, 0x5c, 0x24, 0x02, 0x01, + 0x37, 0x03, 0x27, 0x13, 0x04, 0x00, 0x00, 0x00, 0xca, 0xca, 0xca, 0xca, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, + 0xfa, 0x18, 0x26, 0x04, 0x6f, 0x7a, 0x7c, 0x01, 0x26, 0x05, 0xee, 0x17, 0x1b, 0x27, 0x37, 0x06, 0x27, 0x11, 0x06, 0x00, 0x02, + 0x00, 0xde, 0xde, 0xde, 0xde, 0x27, 0x15, 0x1d, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0xfa, 0x18, 0x24, 0x07, 0x01, 0x24, 0x08, + 0x01, 0x30, 0x09, 0x41, 0x04, 0x9f, 0x74, 0x66, 0x3c, 0x72, 0x0f, 0xd2, 0xe7, 0x73, 0xb9, 0x9e, 0x1a, 0xfa, 0x9e, 0x6b, 0x15, + 0x0c, 0xa3, 0x2b, 0xbc, 0xff, 0x90, 0x1b, 0x2f, 0xa7, 0xb7, 0x0d, 0xa8, 0x3a, 0x81, 0x3f, 0x85, 0x71, 0x62, 0x00, 0x4c, 0x1d, + 0xde, 0x48, 0xcb, 0x70, 0x38, 0x02, 0x3c, 0x61, 0xe0, 0xf7, 0x9e, 0xaa, 0x40, 0x5d, 0x15, 0xb1, 0x5c, 0xd5, 0xec, 0x41, 0x3b, + 0x7b, 0xc3, 0x1d, 0xdd, 0x3f, 0x41, 0x37, 0x0a, 0x35, 0x01, 0x28, 0x01, 0x18, 0x24, 0x02, 0x05, 0x36, 0x03, 0x04, 0x02, 0x04, + 0x01, 0x18, 0x30, 0x04, 0x14, 0x41, 0x3e, 0x5a, 0xd0, 0x62, 0xee, 0x82, 0xe7, 0x1b, 0xe9, 0x81, 0xaf, 0x2c, 0xab, 0x35, 0x65, + 0x01, 0x2f, 0x4d, 0x74, 0x30, 0x05, 0x14, 0xf0, 0x51, 0x63, 0xff, 0x96, 0x1d, 0xb7, 0x7d, 0xa0, 0x63, 0x88, 0x29, 0x02, 0xd4, + 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x30, 0x06, 0x1a, 0x30, 0x18, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x11, 0x30, 0x0f, 0x81, + 0x0d, 0x74, 0x65, 0x73, 0x74, 0x40, 0x63, 0x68, 0x69, 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x30, 0x06, 0x22, 0x30, 0x20, 0x06, 0x08, + 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x14, 0x30, 0x12, 0x30, 0x10, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, + 0x07, 0x30, 0x01, 0x86, 0x04, 0x74, 0x65, 0x73, 0x74, 0x18, 0x30, 0x0b, 0x40, 0x78, 0x3c, 0xca, 0xb4, 0xe5, 0xe0, 0xfd, 0xd8, + 0x9e, 0xf3, 0x5c, 0x11, 0xfd, 0xda, 0x66, 0x27, 0x1e, 0x53, 0x12, 0xad, 0x50, 0x3f, 0x61, 0xef, 0x8c, 0xf4, 0x79, 0x42, 0xae, + 0x8c, 0xf0, 0xde, 0xc1, 0x60, 0x4e, 0xf2, 0xfb, 0x35, 0x1c, 0x26, 0x92, 0x73, 0x76, 0x4c, 0x3f, 0x38, 0xbf, 0x3a, 0x50, 0x47, + 0x5e, 0x64, 0xb0, 0x37, 0x42, 0xfd, 0x47, 0xc0, 0x17, 0xe7, 0x8b, 0x00, 0x2c, 0x93, 0x18, }; extern const uint32_t sTestCert_Node02_06_Chip_Len = sizeof(sTestCert_Node02_06_Chip); @@ -2106,11 +2104,10 @@ extern const uint8_t sTestCert_Node02_07_Chip[] = { 0xe3, 0x6d, 0xc4, 0xfc, 0xf5, 0x75, 0x30, 0x06, 0x1d, 0x30, 0x1b, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x01, 0x01, 0xff, 0x04, 0x11, 0x30, 0x0f, 0x81, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x40, 0x63, 0x68, 0x69, 0x70, 0x2e, 0x6f, 0x72, 0x67, 0x30, 0x06, 0x22, 0x30, 0x20, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x01, 0x01, 0x04, 0x14, 0x30, 0x12, 0x30, 0x10, 0x06, 0x08, 0x2b, 0x06, - 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x04, 0x74, 0x65, 0x73, 0x74, 0x18, 0x35, 0x0b, 0x30, 0x01, 0x20, 0x36, 0x93, 0x1e, - 0xd8, 0xb4, 0xbc, 0x26, 0x74, 0x4a, 0x4f, 0xe3, 0xd2, 0x91, 0x02, 0x80, 0xc2, 0x36, 0xbc, 0x0d, 0x3d, 0xdd, 0xb4, 0x8a, 0x6c, - 0x78, 0x64, 0xd6, 0x2a, 0x59, 0x71, 0x19, 0x96, 0x30, 0x02, 0x21, 0x00, 0xdd, 0x81, 0x85, 0x73, 0x82, 0x0e, 0xc6, 0x91, 0xea, - 0x7c, 0x34, 0xd7, 0xc5, 0xc7, 0xc3, 0x83, 0x5f, 0x96, 0x09, 0x4b, 0xc8, 0x3a, 0xc5, 0x2c, 0xc1, 0xaf, 0xad, 0x55, 0x5e, 0x5f, - 0x63, 0xef, 0x18, 0x18, + 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x04, 0x74, 0x65, 0x73, 0x74, 0x18, 0x30, 0x0b, 0x40, 0x36, 0x93, 0x1e, 0xd8, 0xb4, + 0xbc, 0x26, 0x74, 0x4a, 0x4f, 0xe3, 0xd2, 0x91, 0x02, 0x80, 0xc2, 0x36, 0xbc, 0x0d, 0x3d, 0xdd, 0xb4, 0x8a, 0x6c, 0x78, 0x64, + 0xd6, 0x2a, 0x59, 0x71, 0x19, 0x96, 0xdd, 0x81, 0x85, 0x73, 0x82, 0x0e, 0xc6, 0x91, 0xea, 0x7c, 0x34, 0xd7, 0xc5, 0xc7, 0xc3, + 0x83, 0x5f, 0x96, 0x09, 0x4b, 0xc8, 0x3a, 0xc5, 0x2c, 0xc1, 0xaf, 0xad, 0x55, 0x5e, 0x5f, 0x63, 0xef, 0x18, }; extern const uint32_t sTestCert_Node02_07_Chip_Len = sizeof(sTestCert_Node02_07_Chip); diff --git a/src/crypto/CHIPCryptoPAL.h b/src/crypto/CHIPCryptoPAL.h index ccb06d24292f69..4b481204c81e8f 100644 --- a/src/crypto/CHIPCryptoPAL.h +++ b/src/crypto/CHIPCryptoPAL.h @@ -36,9 +36,13 @@ namespace chip { namespace Crypto { -const size_t kP256_FE_Length = 32; -const size_t kP256_Point_Length = (2 * kP256_FE_Length + 1); -const size_t kSHA256_Hash_Length = 32; +// TODO: Consider renaming these values to be closer to definisions in the spec: +// CHIP_CRYPTO_GROUP_SIZE_BYTES +// CHIP_CRYPTO_PUBLIC_KEY_SIZE_BYTES +const size_t kP256_FE_Length = 32; +const size_t kP256_ECDSA_Signature_Length_Raw = (2 * kP256_FE_Length); +const size_t kP256_Point_Length = (2 * kP256_FE_Length + 1); +const size_t kSHA256_Hash_Length = 32; const size_t kMax_ECDH_Secret_Length = kP256_FE_Length; const size_t kMax_ECDSA_Signature_Length = 72; diff --git a/src/tools/chip-cert/Cmd_PrintCert.cpp b/src/tools/chip-cert/Cmd_PrintCert.cpp index 809eddfecf6805..c815f3a30e6d9c 100644 --- a/src/tools/chip-cert/Cmd_PrintCert.cpp +++ b/src/tools/chip-cert/Cmd_PrintCert.cpp @@ -361,11 +361,7 @@ bool PrintCert(const char * fileName, X509 * cert) } indent -= 4; - Indent(file, indent); - fprintf(file, "Signature:\n"); - indent += 4; - PrintHexField(file, "r", indent, certData->mSignature.RLen, certData->mSignature.R); - PrintHexField(file, "s", indent, certData->mSignature.SLen, certData->mSignature.S); + PrintHexField(file, "Signature ", indent, certData->mSignatureLen, certData->mSignature); exit: CloseFile(file);