Skip to content

Commit 6a28ca4

Browse files
authored
Merge pull request #503 from smallstep/mariano/x5c-insecure
Require ClientAuth when verifying an X5cInsecure certificate
2 parents d694da8 + 47190f3 commit 6a28ca4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jose/parse.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,9 @@ func ParseX5cInsecure(tok string, roots []*x509.Certificate) (*JSONWebToken, [][
267267
Intermediates: interPool,
268268
// A hack so we skip validity period validation.
269269
CurrentTime: leaf.NotAfter.Add(-1 * time.Minute),
270+
KeyUsages: []x509.ExtKeyUsage{
271+
x509.ExtKeyUsageClientAuth,
272+
},
270273
})
271274
if err != nil {
272275
return nil, nil, errors.Wrap(err, "error verifying x5cInsecure certificate chain")

0 commit comments

Comments
 (0)