MicrochipTech / cryptoauth_trustplatform_designsuite

The Trust Platform for CryptoAuthenticationâ„¢ is a combination of multiple elements to simplify the addition of security to any embedded design. This platform includes Hardware protyping tools along with a unique design suite to accelerate the prototyping of the most common use cases.
Other
14 stars 12 forks source link

Fixes problems with verify_cert_chain() #7

Closed cquartier closed 2 years ago

cquartier commented 3 years ago

The 08_asymmetric_authentication notebook was not properly verifying the cert chain and skipping over the failed check without asserting. This PR adds a check for the return value, but also adds root_cert and signer_cert as return values from rebuild_cert(), which are then passed into the verify_cert_chain() call along with device_cert. Also fixes print statements in verify_cert_chain() to reflect which certs are being checked.