r/programming • • Apr 09 '14

Theo de Raadt: "OpenSSL has exploit mitigation countermeasures to make sure it's exploitable"

[deleted] — view deleted post

2.0k Upvotes

661 comments sorted by

View all comments

Show parent comment

111

u/Catsler Apr 09 '14

Some coding style and functions on display.

https://www.peereboom.us/assl/assl/html/openssl.html

35

u/dzamir Apr 09 '14

This was painful to read

31

u/[deleted] Apr 09 '14

When I come to power, indentation practices like that will result in a severe beating. There's no reason for that to have been checked in.

23

u/emergent_properties Apr 09 '14

The idea is that your code is not supposed to look obfuscated BEFORE you put it in an obfuscator!

32

u/[deleted] Apr 09 '14

Beatings will continue until indentation practices improve?

14

u/gthank Apr 09 '14

No. The beatings are punishment for the original sindentation.

2

u/netinept Apr 10 '14

sindendation : indentation sin

5

u/Various_Pickles Apr 09 '14

I enjoy working in Java-land: Eclipse Code Formatter XML file, in version control, at the root directory of the project tree.

Eclipse + IntelliJ use it identically. Developers can write w/e crazy diarrhea-of-consciousness-formatted code they want: one quick action before checkin, and the entire codebase follows the same code style.

→ More replies (1)

0

u/[deleted] Apr 09 '14

[deleted] — view deleted comment

28

u/red_sky Apr 09 '14

I'm fairly certain that was just an example of the kinds of things he found, but isn't actual code from OpenSSL. If you keep scrolling, he gives specific examples.

→ More replies (2)

2

u/Mysterious_Andy Apr 10 '14

HOLY FUCKING SHITCRACKERS!!!

Do they seriously end an ifdef block inside the middle of an else block by omitting the braces?

That's clever in the same sense that building an impenetrable maze is clever.

→ More replies (3)

38

u/semperverus Apr 09 '14

Why is chrome telling me that sites certificate can't be trusted?

80

u/obfuscation_ Apr 09 '14

Because it's a self-signed certificate

→ More replies (1)

24

u/nosneros Apr 09 '14

Self signed certificate.

21

u/FudgeCakeOmNomNom Apr 09 '14

It is still encrypted, but as others pointed out, your browser doesn't recognize the issuer of their certificate because it was self-signed and not by one of the built-in root certificate authorities.

→ More replies (2)

4

u/Sigals Apr 09 '14

It's a self signed cert.

0

u/[deleted] Apr 09 '14

[deleted] — view deleted comment

11

u/semperverus Apr 09 '14

Ironic, considering it's an article about how shitty OpenSSL is.

52

u/shub Apr 09 '14

Not really. Some crypto geeks are not fans at all of PKI.

35

u/mianosm Apr 09 '14

Security that assumes trust because of a built trust is the annoying part.

Why should anyone blindly trust someone only due to the fact that they pay into someone else's company?

SSL/TLS certificates should be trusted like SSH/GPG keys - not predefined white listed.

I would rather a better non-centralized way of assigning trust/security than corporations that assure people they're trustworthy (politicians seem to have the same game: "trust me, I'd never lie".....).

13

u/ThisIsMy12thAccount Apr 09 '14

There's some been interesting ideas building around using bitcoin-style blockchains to create a non-centralized SSL/TLS alternative that doesn't rely on implicit trust of any single organization. There's some info on the namecoin wiki if you're interested

5

u/funk_monk Apr 09 '14

What do you mean? Why would I ever distrust Verisign?

→ More replies (3)
→ More replies (1)

6

u/Steltek Apr 09 '14

PKI would be more appealing if cert pinning were viable. Chrome has it just for Google sites. Firefox has the "Cert Patrol" extension but it's not at all friendly to use. It borders more on the paranoid than the practical.

→ More replies (1)
→ More replies (1)
→ More replies (1)

3

u/kankyo Apr 09 '14

Looks like the code in PuttY. Also POS software, and also the code everyone uses.

→ More replies (7)