<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>We've now seen critical errors in two different TLS implementations, <br>both of which centered around (different) failures to properly <br>
verify X.509 certificate chains. <br></div><br></div>As problematic as PKI is, these are bugs that shouldn't have happened. But they're both 'Type II' errors; a failure to recognize a problem that<br></div>
should have generated an alarm. The 'happy path' code gets tested<br></div>all the time - normal operation relies on it working. It's the 'unhappy<br>path' which only gets exercised when something is going wrong that<br>
</div>implements these holes. Testing the 'unhappy path' is crucial, <br>since normal operation doesn't run that way. Apparently this wasn't done.<br></div><br>Hard experience has taught us all that its difficult to get developers<br>
to do thorough testing of code that is rarely if ever run, especially if<br>there's a lot of work involved in setting up the tests.<br><br></div>I found myself thinking about a test suite of certificates which had<br>
</div>known problems, and which *should* cause apps encountering them<br>to throw errors. Never one to re-invent the wheel, I started poking<br> around.<br></div><div><br></div>What I found was PKITS:<br><a href="http://csrc.nist.gov/groups/ST/crypto_apps_infra/pki/pkitesting.html">http://csrc.nist.gov/groups/ST/crypto_apps_infra/pki/pkitesting.html</a><br>
</div><div>Its about 10 years old.<br></div><div><br></div>Reading the tests and related documents, this seems a pretty <br>reasonable set of tests. It even includes a set of certs which <br>*should* generate failures.<br>
<br></div>I'm fully aware that anything crypto-related coming out of NIST<br></div>today is viewed with a jaundiced eye. But the tests PKITS claims<br>to perform seem a good start, and include the critical Type II error<br>
</div><div>tests.<br><br></div><div>Can we use an updated version of PKITS? Would such a suite have<br></div><div>picked up the iOS and gnuTLS bugs? I haven't tried yet.<br><br></div><div>I expect we'd have to generate a new set of busted certificates; <br>
aside from the trust issue, the included certs are all RSAsha1 <br>with 1024 bit keys, and the validity dates are aging out.<br></div><div><br></div><div>Looking at the PKITS tests, can anyone spot anything critical missing?<br>
<br></div><div>Does anyone want to update this?<br><br></div><div>Peter Trei<br><br><br></div><div><br><br></div><div><div><div><div><br><br><div><div><div><div><div><div><div><div><div><br><br></div></div></div></div></div>
</div></div></div></div></div></div></div></div></div>