Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jprenken committed Nov 22, 2024
1 parent ff6c22d commit afaf04b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions cmd/boulder-wfe2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,8 @@ func main() {
cmd.Fail("'getNonceService' must be configured")
}

var noncePrefixKey []byte
if c.WFE.NonceHMACKey.KeyFile != "" {
noncePrefixKey, err = c.WFE.NonceHMACKey.Load()
cmd.FailOnError(err, "Failed to load nonceHMACKey file")
} else {
cmd.Fail("NonceHMACKey KeyFile must be set")
}
noncePrefixKey, err := c.WFE.NonceHMACKey.Load()
cmd.FailOnError(err, "Failed to load nonceHMACKey file")

getNonceConn, err := bgrpc.ClientSetup(c.WFE.GetNonceService, tlsConfig, stats, clk)
cmd.FailOnError(err, "Failed to load credentials and create gRPC connection to get nonce service")
Expand Down
9 changes: 2 additions & 7 deletions cmd/nonce-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,8 @@ func main() {
c.NonceService.DebugAddr = *debugAddr
}

var key []byte
if c.NonceService.NonceHMACKey.KeyFile != "" {
key, err = c.NonceService.NonceHMACKey.Load()
cmd.FailOnError(err, "Failed to load nonceHMACKey file.")
} else {
cmd.Fail("NonceHMACKey KeyFile must be set")
}
key, err := c.NonceService.NonceHMACKey.Load()
cmd.FailOnError(err, "Failed to load nonceHMACKey file.")

noncePrefix, err := derivePrefix(key, c.NonceService.GRPC.Address)
cmd.FailOnError(err, "Failed to derive nonce prefix")
Expand Down

0 comments on commit afaf04b

Please sign in to comment.