diff --git a/README.md b/README.md index 949465d..1de1bd3 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ -easyca +easypki ====== -Easyca attempts to make managing a Certificate Authority very easy. +Easypki attempts to make managing a Certificate Authority very easy. Serial, index, etc, are formatted in a way to be compatible with openssl, -so you can use openssl for commands not implemented by easyca. +so you can use openssl for commands not implemented by easypki. # Usage -Easyca usage is straighforward: +Easypki usage is straighforward: 1. Init the directory you will use 2. Create the CA @@ -25,28 +25,28 @@ export PKI_PROVINCE="New York" ``` Before being able to create you certificates, you need to `init` the root directory. -It creates files and directories required by easyca. +It creates files and directories required by easypki. ``` mkdir $PKI_ROOT -easyca init +easypki init ``` Args passed to create make the Common Name, here: "Umbrella Corp Global Authority" ``` -easyca create --ca Umbrella Corp Global Authority +easypki create --ca Umbrella Corp Global Authority ``` Then you can choose between server and client certificate, by default server is implied, to generate a client certificate add `--client` Generate a wildcard certificate for your web apps: ``` -easyca create --dns "*.umbrella.com" *.umbrella.com +easypki create --dns "*.umbrella.com" *.umbrella.com ``` Another example, a certificate for wiki and www: ``` -easyca create --dns "www.umbrella.com" --dns "wiki.umbrella.com" www.umbrella.com +easypki create --dns "www.umbrella.com" --dns "wiki.umbrella.com" www.umbrella.com ``` For more info about available flags, checkout out the help `-h` diff --git a/cmd/easyca/main.go b/cmd/easypki/main.go similarity index 93% rename from cmd/easyca/main.go rename to cmd/easypki/main.go index 5efa271..6f55311 100644 --- a/cmd/easyca/main.go +++ b/cmd/easypki/main.go @@ -25,7 +25,7 @@ import ( "time" "github.com/codegangsta/cli" - "github.com/jeremy-clerc/easyca/pkg/easyca" + "github.com/jeremy-clerc/easypki/pkg/easypki" ) // https://access.redhat.com/documentation/en-US/Red_Hat_Certificate_System/8.0/html/Admin_Guide/Standard_X.509_v3_Certificate_Extensions.html @@ -33,7 +33,7 @@ import ( func initPki(c *cli.Context) { log.Print("generating new pki structure") - if err := easyca.GeneratePKIStructure(c.GlobalString("root")); err != nil { + if err := easypki.GeneratePKIStructure(c.GlobalString("root")); err != nil { log.Fatalf("generate pki structure: %v", err) } } @@ -93,7 +93,7 @@ func createBundle(c *cli.Context) { template.IPAddresses = IPs template.DNSNames = c.StringSlice("dns") } - err := easyca.GenerateCertifcate(c.GlobalString("root"), filename, template) + err := easypki.GenerateCertifcate(c.GlobalString("root"), filename, template) if err != nil { log.Fatal(err) } @@ -104,18 +104,18 @@ func revoke(c *cli.Context) { log.Fatalf("Usage: %v path/to/cert.crt", c.Command.FullName()) } crtPath := c.Args().First() - crt, err := easyca.GetCertificate(crtPath) + crt, err := easypki.GetCertificate(crtPath) if err != nil { log.Fatalf("get certificate (%v): %v", crtPath, err) } - err = easyca.RevokeSerial(c.GlobalString("root"), crt.SerialNumber) + err = easypki.RevokeSerial(c.GlobalString("root"), crt.SerialNumber) if err != nil { log.Fatalf("revoke serial %X: %v", crt.SerialNumber, err) } } func gencrl(c *cli.Context) { - if err := easyca.GenCRL(c.GlobalString("root"), c.Int("expire")); err != nil { + if err := easypki.GenCRL(c.GlobalString("root"), c.Int("expire")); err != nil { log.Fatalf("general crl: %v", err) } } diff --git a/pkg/easyca/easyca.go b/pkg/easypki/easyca.go similarity index 99% rename from pkg/easyca/easyca.go rename to pkg/easypki/easyca.go index 93c0662..0c908d2 100644 --- a/pkg/easyca/easyca.go +++ b/pkg/easypki/easyca.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package easyca +package easypki import ( "bufio" diff --git a/pkg/easyca/easyca_test.go b/pkg/easypki/easyca_test.go similarity index 99% rename from pkg/easyca/easyca_test.go rename to pkg/easypki/easyca_test.go index 176b5fb..ece603a 100644 --- a/pkg/easyca/easyca_test.go +++ b/pkg/easypki/easyca_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package easyca +package easypki import ( "io/ioutil"