Skip to content

Commit

Permalink
fix crash when calling runtime KM with nil map
Browse files Browse the repository at this point in the history
  • Loading branch information
matevz committed Dec 24, 2019
1 parent c6ed2e3 commit a05687e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go/registry/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ func VerifyRegisterRuntimeArgs(logger *logging.Logger, sigRt *SignedRuntime, isG

// VerifyRegisterComputeRuntimeArgs verifies ComputeRuntime-specific arguments for RegisterRuntime.
func VerifyRegisterComputeRuntimeArgs(logger *logging.Logger, rt *Runtime, kmMap map[signature.PublicKey]*Runtime) error {
if kmMap[*rt.KeyManager] == nil {
if kmMap == nil && rt.KeyManager != nil || kmMap != nil && kmMap[*rt.KeyManager] == nil {
logger.Error("RegisterRuntime: key manager ID not found as a valid key manager runtime",
"runtime", rt,
)
Expand Down

0 comments on commit a05687e

Please sign in to comment.