SSH Certificate Authority Toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
880 B

4 years ago
  1. package main
  2. /*
  3. The SSH Certificate Authority Toolkit
  4. */
  5. import (
  6. "log"
  7. "os"
  8. "github.com/urfave/cli"
  9. )
  10. func main() {
  11. app := cli.NewApp()
  12. app.Name = "ssh-cert"
  13. app.Usage = "SSH Certificate Authority Toolkit"
  14. app.EnableBashCompletion = true
  15. app.Version = "0.1"
  16. app.Flags = []cli.Flag{
  17. cli.StringFlag{
  18. Name: "config, c",
  19. Usage: "Load configuration from `FILE`",
  20. },
  21. }
  22. app.Commands = []cli.Command{
  23. {
  24. Name: "sign",
  25. Usage: "Sign user certificates for environments",
  26. Flags: signFlags(),
  27. Action: sign,
  28. },
  29. {
  30. Name: "server",
  31. Usage: "Run the API Server",
  32. Flags: serverFlags(),
  33. Action: runServer,
  34. },
  35. {
  36. Name: "test",
  37. Usage: "Test the configuration file to ensure it follows standards.",
  38. Flags: configTestFlags(),
  39. Action: configTest,
  40. },
  41. }
  42. err := app.Run(os.Args)
  43. if err != nil {
  44. log.Fatal(err)
  45. }
  46. }