Skip to content

Commit ed58731

Browse files
committed
Change term header to prefix
1 parent 3235cad commit ed58731

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

proxy/clientcertvalidate/parser.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@ func (p *defaultSubjectParser) Parse() (ParsedSubject, error) {
8888
kvs: make(KVs),
8989
}
9090

91-
header, err := p.consume(2) // read header
91+
prefix, err := p.consume(2) // read prefix
9292
if err != nil {
9393
// did not consume enough:
94-
return output, errors.New("no header found")
94+
return output, errors.New("no prefix found")
9595
}
96-
if (header[0] == 's' || header[0] == 'r') && header[1] == ':' {
97-
switch header[0] {
96+
if (prefix[0] == 's' || prefix[0] == 'r') && prefix[1] == ':' {
97+
switch prefix[0] {
9898
case 's':
9999
output.inputValuesType = ClientCertificateHeaderString
100100
case 'r':
101101
output.inputValuesType = ClientCertificateHeaderPattern
102102
}
103-
// header is valid, read KVs:
103+
// prefix is valid, read KVs:
104104

105105
for { // until EOF
106106
nextRune, lookupErr := p.lookupOne()
@@ -149,7 +149,7 @@ func (p *defaultSubjectParser) Parse() (ParsedSubject, error) {
149149
return output, nil
150150
}
151151

152-
return output, errors.New("subject header invalid, s: or r: expected")
152+
return output, errors.New("subject prefix invalid, s: or r: expected")
153153
}
154154

155155
func (p *defaultSubjectParser) readAlphaStringUntil(boundary rune) (string, error) {

0 commit comments

Comments
 (0)