MCPcopy
hub / github.com/smallstep/cli / getEncryptedKeyAction

Function getEncryptedKeyAction

command/ca/provisioner/getEncryptedKey.go:40–59  ·  view source on GitHub ↗
(ctx *cli.Context)

Source from the content-addressed store, hash-verified

38}
39
40func getEncryptedKeyAction(ctx *cli.Context) error {
41 if err := errs.NumberOfArguments(ctx, 1); err != nil {
42 return err
43 }
44
45 kid := ctx.Args().Get(0)
46 root := ctx.String("root")
47 caURL, err := flags.ParseCaURL(ctx)
48 if err != nil {
49 return err
50 }
51
52 key, err := pki.GetProvisionerKey(caURL, root, kid)
53 if err != nil {
54 return errors.Wrap(err, "error getting the provisioning key")
55 }
56
57 fmt.Println(key)
58 return nil
59}

Callers

nothing calls this directly

Calls 2

ParseCaURLFunction · 0.92
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…