PeculiarVentures / PKI.js

PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
http://pkijs.org
Other
1.25k stars 204 forks source link

Verify SignedData without root (an intermediate is trusted). #408

Open supersasha opened 4 weeks ago

supersasha commented 4 weeks ago

Hi guys!

1) I have all the certificates in a SignedData structure except for the root CA's one. At the same time one of intermediate CA's certificates is trusted so that I seem don't need to have a root:

signer -> intermediate1 -> intermediate2 (trusted) -> root (absent)

Can I use SignedData.verify() to verify the chain (without having root)? The root is the "Microsoft Code Verification Root" which I'm not able to find.

UPD: 2) I've also noticed that there seems no difference between:

But as far as I understand there should be the significant difference between them:

Thank you!