ioerror/tlsdate — pull request #76 by xnyhps (2013-02-14 09:37:40+00:00)
Title: Fiix looking up DNS Name fields if the CN doesn't match the hostname.

There were two bugs:

1. `check_cn()` aborted when the data read from the CN field wasn't exactly
length of the `hostname`. What makes more sense to check here is to make
sure that the number of bytes read matches the length of the buffer it
was read into, `cn_buf`.
2. `check_san()` didn't check any further DNS Names when the first didn't
match as a wildcard name (the hostname needs to match on just one of
the DNS Names, not all of them).

#45 reports the same problem as 2.

As an example, https://xnyhps.nl has a certificate with CN "www.xnyhps.nl", and DNS Names "www.xnyhps.nl" and "xnyhps.nl". Due to them being in that order, and `strlen("www.xnyhps.nl") != strlen("xnyhps.nl")`, the certificate is incorrectly rejected.