• 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
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...