Skip to content

Commit

Permalink
missing stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
cviecco committed Dec 9, 2024
1 parent 987348d commit 97629a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/keymasterd/roleRequestingCert.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ func (state *RuntimeState) parseRoleCertGenParams(r *http.Request) (*roleRequest
return nil, fmt.Errorf("missing required requestor_netblock param"), nil
}
for _, netBlock := range targetNetblockStrings {
_, _, err := net.ParseCIDR(netBlock)
_, parsedNetBlock, err := net.ParseCIDR(netBlock)
if err != nil {
state.logger.Printf("%s", err)
return nil, fmt.Errorf("invalid netblock %s", netBlock), nil
}
rvalue.TargetNetblocks = append(rvalue.TargetNetblocks, *parsedNetBlock)
}

// publickey
Expand Down Expand Up @@ -154,7 +155,7 @@ func (state *RuntimeState) roleRequetingCertGenHandler(w http.ResponseWriter, r
}

// TODO: maybe add a check to ensure no self-replication
// We dont anything to request a rolerequsting role for itself
// We dont anything to request a rolerequesting role for itself

/// Now we parse the inputs
if r.Method != "POST" {
Expand Down

0 comments on commit 97629a5

Please sign in to comment.