-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from devilbox/release-0.1
Release v0.1
- Loading branch information
Showing
6 changed files
with
158 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
sudo: required | ||
|
||
language: bash | ||
|
||
before_install: | ||
# Add more modern repos | ||
- sudo apt-get update -qq | ||
- sudo apt-get install -qq python-software-properties | ||
- sudo add-apt-repository ppa:brightbox/ruby-ng -y | ||
- sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu/ trusty-backports restricted main universe" | ||
|
||
# Update sources | ||
- sudo apt-get update -qqy | ||
|
||
# Install | ||
- sudo apt-get install -qqy shellcheck | ||
|
||
|
||
script: | ||
|
||
- shellcheck --shell=bash bin/ca-gen | ||
- shellcheck --shell=bash bin/cert-gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Configuration | ||
SHELL = /bin/sh | ||
|
||
MKDIR_P = mkdir -p | ||
|
||
|
||
help: | ||
@echo Options | ||
@echo " make install" | ||
@echo " Install everthing (requires sudo or root)" | ||
@echo "" | ||
@echo " make help" | ||
@echo " Show this help screen" | ||
|
||
|
||
install: | ||
|
||
@echo "Installing files" | ||
@echo "" | ||
|
||
@# Create directories | ||
${MKDIR_P} /usr/local/bin | ||
|
||
@# Install binary | ||
install -m 0755 bin/ca-gen /usr/local/bin/ca-gen | ||
install -m 0755 bin/cert-gen /usr/local/bin/cert-gen | ||
|
||
|
||
@echo "Installation complete:" | ||
@echo "----------------------------------------------------------------------" | ||
@echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,60 @@ | ||
# ca-gen | ||
|
||
[![Build Status](https://travis-ci.org/devilbox/cert-gen.svg?branch=master)](https://travis-ci.org/devilbox/cert-gen) | ||
[![Join the chat at https://gitter.im/devilbox/Lobby](https://badges.gitter.im/devilbox/Lobby.svg)](https://gitter.im/devilbox/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) | ||
![Tag](https://img.shields.io/github/tag/devilbox/ca-gen.svg) | ||
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) | ||
|
||
Easily create your own CA and self-signed certificates. | ||
|
||
CA can be imported into Chrome, Firefox and Internet Explorer for local development. | ||
The generated CA can be imported into Chrome, Firefox or Internet Explorer for local development. | ||
All subsequent created certificates will then be valid SSL certificates to each browser. | ||
|
||
<img width="200" style="width:200px;" src="img/address-bar.png" /> | ||
|
||
**Table of Contents** | ||
|
||
1. [Available Tools](#available-tools) | ||
1. [Tools](#tools) | ||
2. [Requirements](#requirements) | ||
3. [Installation](#installation) | ||
2. [Create Certificate Authoriy](#create-certificate-authority) | ||
1. [Usage: ca-gen](#usage-ca-gen) | ||
2. [Execute: ca-gen](#execute-ca-gen) | ||
3. [Example: CA](#example-ca) | ||
3. [Create SSL Certificate](#create-ssl-certificate) | ||
1. [Usage: cert-gen](#usage-cert-gen) | ||
2. [Execute: cert-gen](#execute-cert-gen) | ||
3. [Example: SSL certificate](#example-ssl-certificate) | ||
4. [Import CA into Chrome](#import-ca-into-chrome) | ||
5. [License](#license) | ||
|
||
---- | ||
|
||
## Available Tools | ||
|
||
* [ca-gen](bin/ca-gen) | ||
* [cert-gen](bin/cert-gen) | ||
#### Tools | ||
|
||
| Tools | Description | | ||
|--------------------------|-------------| | ||
| [ca-gen](bin/ca-gen) | Creates a certificate authority | | ||
| [cert-gen](bin/cert-gen) | Creates SSL certificates signed by a certificate authority | | ||
|
||
## Create CA | ||
#### Requirements | ||
|
||
#### Devilbox example | ||
* `openssl` | ||
* `bash` | ||
|
||
#### Installation | ||
```bash | ||
$ ca-gen -v -c DE -s Berlin -l Berlin -o Devilbox -u Devilbox -n devilbox.org \ | ||
-e [email protected] devilbox-rootCA.key devilbox-rootCA.crt | ||
$ sudo make install | ||
``` | ||
|
||
#### Usage | ||
|
||
## Create Certificate Authority | ||
|
||
#### Usage: ca-gen | ||
The following shows the general usage for `ca-gen`: | ||
```bash | ||
USAGE: ca-gen -n CN [-kdcslouev] <keyfile> <crtfile> | ||
ca-gen --help | ||
|
@@ -43,7 +79,14 @@ Required parameter | |
<crtfile> Path to output cert file | ||
``` | ||
|
||
#### Example output | ||
#### Execute: ca-gen | ||
The following command shows how the CA is generated for the [Devilbox](https;//github.com/cytopia/devilbox): | ||
```bash | ||
$ ca-gen -v -c DE -s Berlin -l Berlin -o Devilbox -u Devilbox -n devilbox.org \ | ||
-e [email protected] devilbox-rootCA.key devilbox-rootCA.crt | ||
``` | ||
|
||
#### Example: CA | ||
```bash | ||
Certificate: | ||
Data: | ||
|
@@ -106,21 +149,10 @@ Certificate: | |
``` | ||
|
||
|
||
## Create certificate | ||
|
||
#### Devilbox example | ||
```bash | ||
$ cert-gen -v -c DE -s Berlin -l Berlin -o Devilbox -u Devilbox \ | ||
-n project.loc -e [email protected] \ | ||
-a '*.project.loc,*.www.project.loc' \ | ||
devilbox-rootCA.key \ | ||
devilbox-rootCA.crt \ | ||
project.loc.key \ | ||
project.loc.csr \ | ||
project.loc.crt | ||
``` | ||
## Create SSL Certificate | ||
|
||
#### Usage | ||
#### Usage: cert-gen | ||
The following shows the general usage for cert-gen: | ||
```bash | ||
USAGE: cert-gen -n CN [-kdcsloueav] <ca-key> <ca-crt> <key> <csr> <crt> | ||
cert-gen --help | ||
|
@@ -149,7 +181,20 @@ Required parameter | |
<crt> Path to output certificate crt file | ||
``` | ||
|
||
#### Example output | ||
#### Execute: cert-gen | ||
The following command shows how SSL certificates are generated for the [Devilbox](github.com/cytopia/devilbox): | ||
```bash | ||
$ cert-gen -v -c DE -s Berlin -l Berlin -o Devilbox -u Devilbox \ | ||
-n project.loc -e [email protected] \ | ||
-a '*.project.loc,*.www.project.loc' \ | ||
devilbox-rootCA.key \ | ||
devilbox-rootCA.crt \ | ||
project.loc.key \ | ||
project.loc.csr \ | ||
project.loc.crt | ||
``` | ||
|
||
#### Example: SSL Certificate | ||
```bash | ||
Certificate: | ||
Data: | ||
|
@@ -206,7 +251,8 @@ Certificate: | |
02:db:c7:03 | ||
``` | ||
|
||
## Import to Chrome | ||
|
||
## Import CA into Chrome | ||
|
||
**1. Open Chrome settings - scroll down and click `Advanced`** | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.