aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/x509/constraints.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/x509/constraints.go')
-rw-r--r--src/crypto/x509/constraints.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/crypto/x509/constraints.go b/src/crypto/x509/constraints.go
index 3c260a9b96..83bfbcb2ef 100644
--- a/src/crypto/x509/constraints.go
+++ b/src/crypto/x509/constraints.go
@@ -375,7 +375,7 @@ func (dnc *dnsConstraints) query(s string) (string, bool) {
return constraint, true
}
- if !dnc.permitted && s[0] == '*' {
+ if !dnc.permitted && len(s) > 0 && s[0] == '*' {
trimmed := trimFirstLabel(s)
if constraint, found := dnc.parentConstraints[trimmed]; found {
return constraint, true