Skip to content

Commit

Permalink
allow Rekor URL to be configured - closes #34 (#35)
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Jennings <richardjennings@gmail.com>
  • Loading branch information
richardjennings authored Mar 24, 2023
1 parent 7b11801 commit cb00f2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package main
import (
"crypto/x509"
"encoding/json"
"flag"
"fmt"
"io"
"net/http"
Expand All @@ -41,13 +42,16 @@ var (
rekorClient *client.Rekor
fulcioRoots *x509.CertPool
fulcioIntermediates *x509.CertPool
rekorURL = flag.String("rekor-url", defaultRekorURL, "specify Rekor URL")
)

func main() {
flag.Parse()

fmt.Println("starting server...")
http.HandleFunc("/validate", validate)

rc, err := rekor.NewClient(defaultRekorURL)
rc, err := rekor.NewClient(*rekorURL)
if err != nil {
panic(fmt.Sprintf("creating Rekor client: %v", err))
}
Expand Down

0 comments on commit cb00f2b

Please sign in to comment.