Skip to content

Commit

Permalink
Add Github to fulcioca path. (#184)
Browse files Browse the repository at this point in the history
Fixes: #183
Signed-off-by: Matt Moore <mattomata@gmail.com>
  • Loading branch information
mattmoor committed Sep 14, 2021
1 parent 922b7cd commit 546e5a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/ca/fulcioca/fulcioca.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ func CreateClientCertificate(rootCA *x509.Certificate, subject *challenges.Chall
return "", nil, err
}
cert.URIs = []*url.URL{challengeURL}
case challenges.GithubWorkflowValue:
jobWorkflowURI, err := url.Parse(subject.Value)
if err != nil {
return "", nil, err
}
cert.URIs = []*url.URL{jobWorkflowURI}
}
certBytes, err := x509.CreateCertificate(rand.Reader, cert, rootCA, publicKeyPEM, privKey)
if err != nil {
Expand Down

0 comments on commit 546e5a3

Please sign in to comment.