sslwatcher/ct-log-server — pull request #3 by AlCutter (2014-09-08 14:09:00+00:00)
Title: Correct Hash/Sig ordering in DigitallySigned struct.

Hi Matt,

I was noticing some odd behaviour on Alpha - the SCTs being returned had invalid signatures, we noticed that the first two bytes of your signature struct looked like they were swapped around and so I had a quick poke in the code, and it does indeed look as though the serialisation order of the hash & signature algorithm indicators are reversed (see RFC5246 "Signature Algorithms" section: http://tools.ietf.org/html/rfc5246#section-7.4.1.4.1).

The cunningly named "SignatureAndHashAlgorithm" structure is really 'HashAndSignature' when considering the actual ordering!

I don't really know anything about Ruby, so hopefully the PR makes sense.