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

Fix splice usage pattern #396

Closed xltan closed 3 months ago

xltan commented 3 months ago

You should not modify(splice) the array in ascending order while iterating over it using a for loop. Affect modules: CertificateChainValidationEngine SignedCertificateTimestamp

xltan commented 3 months ago

Hi, @microshine, not sure if I tagged the right person, would you please have a look into this? I believe CertificateChainValidationEngine.verify currently passes even if no certificate is valid. (if we supply multiple certificates)

coveralls commented 3 months ago

Coverage Status

coverage: 74.443% (+0.01%) from 74.432% when pulling e563353af04a36f35fddf5772849242e969e223f on xltan:fix/splice-usage into ace03e1c1f141d0c52da26360012e58ebe77932a on PeculiarVentures:master.

microshine commented 3 months ago

The new version of pkijs@3.0.16 has been released