• rubyist's avatar
    crypto/x509: allow matchHostnames to work with absolute domain names · 32304fc9
    rubyist authored
    If an absolute domain name (i.e. ends in a '.' like "example.com.") is used
    with ssl/tls, the certificate will be reported as invalid. In matchHostnames,
    the host and patterns are split on '.' and if the lengths of the resulting
    slices do not match, the function returns false. When splitting an absolute
    domain name on '.', the slice will have an extra empty string at the end. This
    empty string should be discarded before comparison, if present.
    
    Fixes #9828
    
    Change-Id: I0e39674b44a6f93b5024497e76cf1b550832a61d
    Reviewed-on: https://go-review.googlesource.com/4380Reviewed-by: 's avatarAdam Langley <agl@golang.org>
    TryBot: Adam Langley <agl@golang.org>
    32304fc9
Name
Last commit
Last update
..
aes Loading commit data...
cipher Loading commit data...
des Loading commit data...
dsa Loading commit data...
ecdsa Loading commit data...
elliptic Loading commit data...
hmac Loading commit data...
md5 Loading commit data...
rand Loading commit data...
rc4 Loading commit data...
rsa Loading commit data...
sha1 Loading commit data...
sha256 Loading commit data...
sha512 Loading commit data...
subtle Loading commit data...
tls Loading commit data...
x509 Loading commit data...
crypto.go Loading commit data...