From 97629a5db04a25cbd5061de2748dee7b29cbe3d6 Mon Sep 17 00:00:00 2001 From: Camilo Viecco Date: Mon, 9 Dec 2024 08:13:27 -0800 Subject: [PATCH] missing stuff --- cmd/keymasterd/roleRequestingCert.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/keymasterd/roleRequestingCert.go b/cmd/keymasterd/roleRequestingCert.go index e988c80..7fee759 100644 --- a/cmd/keymasterd/roleRequestingCert.go +++ b/cmd/keymasterd/roleRequestingCert.go @@ -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 @@ -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" {