News for hackers. Stuff that matters.
Re:Apple's SSL/TLS bug by arielweisberg on Saturday February 22, 2014 @10:09AM (#7282240)
How is this code not covered by a unit test?

I'll admit I don't think of myself as great at unit testing, but the first thing I do when writing one for a new tool or class is use a code coverage tool to look for uncovered lines and once I have written a few basic behavioral tests I write tests to exercise and validate the output of the uncovered lines.

This ensures that the tests I write to cover the public API don't miss catching internal behaviors that require more subtlety to uncover.

Re:Apple's SSL/TLS bug by llimllib on Saturday February 22, 2014 @10:15AM (#7282257)
> How is this code not covered by a unit test?

...or an integration test. or a functional test.

When you write an SSL lib, I suspect that at some point you ought to test that it checks f%^&ing certificates :/

Re:Apple's SSL/TLS bug by sneak on Saturday February 22, 2014 @07:01PM (#7284244)
Negligence or malice.

My theory is that Apple is spread too thin. Kayak.com reproducibly crashed MobileSafari the day iOS7 shipped, and brand new iPad minis regularly kernel panic and reboot.

It wasn't always like this.

Re:Apple's SSL/TLS bug by andrewflnr on Saturday February 22, 2014 @09:01PM (#7284609)
Hmm, not just my Nexus 7, then. Fortunately that's not very frequent.
Re:Apple's SSL/TLS bug by gsnedders on Saturday February 22, 2014 @09:47PM (#7284704)
The standard of testing for all SSL/TLS libraries is atrocious, it's not even like SecureTransport is notably worse than most others… :'(

Someone badly needs to sit down and write — preferably a black-box, so it can be used for all — testsuite for SSL/TLS.

Re:Apple's SSL/TLS bug by marcan42 on Sunday February 23, 2014 @07:24AM (#7285715)
An integration test wouldn't catch this one. You need a specific malicious SSL server (presents a valid certificate, uses ephemeral mode, does not present a valid signature proving that it owns the private key). The code does validate certificates, otherwise this would've been caught ages ago by anyone trying an invalid cert.

Unit tests would've caught this, though.

Re:Apple's SSL/TLS bug by brown9-2 on Saturday February 22, 2014 @10:46AM (#7282378)
Well, as the article says: A test case could have caught this, but it's difficult because it's so deep into the handshake. One needs to write a completely separate TLS stack, with lots of options for sending invalid handshakes.
Re:Apple's SSL/TLS bug by joering2 on Saturday February 22, 2014 @12:27PM (#7282748)
Something one would have reasonably expected after second biggest company in the world (NASDAQ, Fortune 50), and first in the IT sector.

The entire OS is damn too huge piece of software for Apple not to test intesively to a fanatic stretch. Since all the NSA revelation and the proven extent to which US government lied and continues to lie to its people about all data gathering, I fail to categorize such a simple but yet brilliant overlook as a mistake.

Re:Apple's SSL/TLS bug by thrownaway2424 on Saturday February 22, 2014 @12:31PM (#7282763)
So you need a mock peer, whoop-de-fuckin-do. Seems like one of these security weenies could sit down and write a test for once.

By the way the test coverage in OpenSSL is piss-poor as well.

Re:Apple's SSL/TLS bug by emmett on Saturday February 22, 2014 @02:01PM (#7283120)
The kind of abusive comments you've been leaving on this thread are not really welcome on HN. Please stop.