Skip to content

Commit

Permalink
Merge pull request #503 from smallstep/mariano/x5c-insecure
Browse files Browse the repository at this point in the history
Require ClientAuth when verifying an X5cInsecure certificate
  • Loading branch information
maraino authored May 15, 2024
2 parents d694da8 + 47190f3 commit 6a28ca4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jose/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ func ParseX5cInsecure(tok string, roots []*x509.Certificate) (*JSONWebToken, [][
Intermediates: interPool,
// A hack so we skip validity period validation.
CurrentTime: leaf.NotAfter.Add(-1 * time.Minute),
KeyUsages: []x509.ExtKeyUsage{
x509.ExtKeyUsageClientAuth,
},
})
if err != nil {
return nil, nil, errors.Wrap(err, "error verifying x5cInsecure certificate chain")
Expand Down

0 comments on commit 6a28ca4

Please sign in to comment.