You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of Go are you using (go version)? go1.6.2
What operating system and processor architecture are you using (go env)? darwin/amd64
What did you do?
A certificate with domain test.example.com is validated with an intermediate certificate having a name constraint of .example.com.
What did you expect to see?
The certificate chain should be valid. A name constraint .example.com should allow all subdomains of example.com, but not the domain itself (according to the RFC).
What did you see instead?
The certificate chain is not considered valid (x509: a root or intermediate certificate is not authorized to sign in this domain), while test..example.com works.
The problem is the check at https://github.com/golang/go/blob/master/src/crypto/x509/verify.go#L172, that enforces a . as the last character of the domain prefix (that's why test..example.com is considered valid).
go version)?go1.6.2go env)?darwin/amd64A certificate with domain
test.example.comis validated with an intermediate certificate having a name constraint of.example.com.The certificate chain should be valid. A name constraint
.example.comshould allow all subdomains of example.com, but not the domain itself (according to the RFC).The certificate chain is not considered valid (
x509: a root or intermediate certificate is not authorized to sign in this domain), whiletest..example.comworks.The problem is the check at https://github.com/golang/go/blob/master/src/crypto/x509/verify.go#L172, that enforces a
.as the last character of the domain prefix (that's whytest..example.comis considered valid).