Skip to content

Commit

Permalink
don't return certifier info if it is not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
poszu committed Nov 13, 2024
1 parent f68ad30 commit 5443911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion registration/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Config struct {
MaxSubmitBatchSize int `long:"max-submit-batch-size" description:"The maximum number of challenges to submit in a single batch"`
SubmitFlushInterval time.Duration `long:"submit-flush-interval" description:"The interval between flushes of the submit queue"`

Certifier *CertifierConfig
Certifier *CertifierConfig `no-flag:"disabled parsing by go-flags because it initializes the pointer"`
}

type Base64Enc []byte
Expand Down
3 changes: 2 additions & 1 deletion rpc/rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ func (r *rpcServer) Submit(ctx context.Context, in *api.SubmitRequest) (*api.Sub

func (r *rpcServer) Info(_ context.Context, _ *api.InfoRequest) (*api.InfoResponse, error) {
var certifierResp *api.InfoResponse_Cerifier
if certifier := r.registration.CertifierInfo(); certifier != nil {
certifier := r.registration.CertifierInfo()
if certifier != nil && len(certifier.URL) > 0 {
certifierResp = &api.InfoResponse_Cerifier{
Url: certifier.URL,
Pubkey: certifier.PubKey,
Expand Down

0 comments on commit 5443911

Please sign in to comment.