Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
rename easyca to easypki
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-clerc committed Sep 13, 2015
1 parent 33549a7 commit 5ceea8b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`
Expand Down
12 changes: 6 additions & 6 deletions cmd/easyca/main.go → cmd/easypki/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ 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
// B.3.8. keyUsage

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)
}
}
Expand Down Expand Up @@ -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)
}
Expand All @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/easyca/easyca.go → pkg/easypki/easyca.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package easyca
package easypki

import (
"bufio"
Expand Down
2 changes: 1 addition & 1 deletion pkg/easyca/easyca_test.go → pkg/easypki/easyca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5ceea8b

Please sign in to comment.