-
Notifications
You must be signed in to change notification settings - Fork 33
Update certificate generation process #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thieryl
wants to merge
4
commits into
devilbox:master
Choose a base branch
from
thieryl:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6c8c7b9
Change the installation path from global to user home dir .local/bin
5f4846b
Make common config for rootCA and certificate external to the scripts…
e1756dd
Make common config for rootCA and certificate external to the scripts…
54619b2
Merge branch 'master' into master
cytopia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -19,46 +19,73 @@ All subsequent created certificates will then be valid SSL certificates to each | |
**Table of Contents** | ||
|
||
1. [Available Tools](#available-tools) | ||
1. [Tools](#tools) | ||
2. [Requirements](#requirements) | ||
3. [Installation](#installation) | ||
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) | ||
1. [Configuration](#config) | ||
2. [Usage: ca-gen](#usage-ca-gen) | ||
3. [Execute: ca-gen](#execute-ca-gen) | ||
4. [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) | ||
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 | ||
|
||
#### Tools | ||
|
||
| Tools | Description | | ||
|--------------------------|-------------| | ||
| [ca-gen](bin/ca-gen) | Creates a certificate authority | | ||
| Tools | Description | | ||
| ------------------------ | ---------------------------------------------------------- | | ||
| [ca-gen](bin/ca-gen) | Creates a certificate authority | | ||
| [cert-gen](bin/cert-gen) | Creates SSL certificates signed by a certificate authority | | ||
|
||
#### Requirements | ||
|
||
* `openssl` | ||
* `bash` | ||
- `openssl` | ||
- `bash` | ||
|
||
#### Installation | ||
|
||
```bash | ||
$ sudo make install | ||
``` | ||
|
||
#### Configuration | ||
|
||
#### config | ||
|
||
update the following file(~/.local/bin/configs) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, not a default location |
||
|
||
```bash | ||
# Generate default options | ||
DEF_KEYSIZE=4096 | ||
DEF_DAYS=3650 | ||
DEF_SIGN_SIGNATURE="sha256" | ||
# Subject default options | ||
DEF_COUNTRY=MU | ||
DEF_STATE=GP | ||
DEF_CITY=Mahebourg | ||
DEF_ORG=Tricky-bit | ||
DEF_UNIT=IT | ||
DEF_CN=tricky-bit.int | ||
[email protected] | ||
# v3 subject alt names | ||
DEF_ALT_NAME=trick-bit.int | ||
DEF_ALT_IP_NAME= | ||
``` | ||
|
||
## 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 | ||
|
@@ -84,13 +111,16 @@ Required parameter | |
``` | ||
|
||
#### 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: | ||
|
@@ -156,11 +186,12 @@ Certificate: | |
3e:3e:85:09 | ||
``` | ||
|
||
|
||
## Create SSL Certificate | ||
|
||
#### 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 | ||
|
@@ -191,7 +222,9 @@ Required parameter | |
``` | ||
|
||
#### Execute: cert-gen | ||
|
||
The following command shows how SSL certificates are generated for the [Devilbox](https://github.com/cytopia/devilbox): | ||
|
||
```bash | ||
$ cert-gen -v -c DE -s Berlin -l Berlin -o Devilbox -u Devilbox \ | ||
-n project.loc -e [email protected] \ | ||
|
@@ -204,6 +237,7 @@ $ cert-gen -v -c DE -s Berlin -l Berlin -o Devilbox -u Devilbox \ | |
``` | ||
|
||
#### Example: SSL Certificate | ||
|
||
```bash | ||
Certificate: | ||
Data: | ||
|
@@ -273,7 +307,6 @@ Certificate: | |
b6:1a:14:ab | ||
``` | ||
|
||
|
||
## Import CA into Chrome | ||
|
||
**1. Open Chrome settings - scroll down and click `Advanced`** | ||
|
@@ -296,7 +329,6 @@ Certificate: | |
|
||
<img width="600" style="width:600px;" src="img/05-set-trust.png" /> | ||
|
||
|
||
## License | ||
|
||
**[MIT License](LICENSE.md)** | ||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -9,18 +9,18 @@ VERSION="v0.10" | |
DATE="2022-12-18" | ||
|
||
# Generate default options | ||
DEF_KEYSIZE=2048 | ||
DEF_DAYS=3650 | ||
DEF_SIGN_SIGNATURE="sha256" | ||
# Subject default options | ||
DEF_COUNTRY= | ||
DEF_STATE= | ||
DEF_CITY= | ||
DEF_ORG= | ||
DEF_UNIT= | ||
DEF_CN= | ||
DEF_EMAIL= | ||
|
||
# DEF_KEYSIZE=2048 | ||
# DEF_DAYS=3650 | ||
# DEF_SIGN_SIGNATURE="sha256" | ||
# # Subject default options | ||
# DEF_COUNTRY=MU | ||
# DEF_STATE=GP | ||
# DEF_CITY=Mahebourg | ||
# DEF_ORG=Tricky-bit | ||
# DEF_UNIT=IT | ||
# DEF_CN=tricky-bit.int | ||
# DEF_EMAIL=[email protected] | ||
source ~/.local/bin/configs | ||
# Verbosity | ||
DEF_VERBOSE= | ||
|
||
|
This file contains hidden or 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 |
---|---|---|
|
@@ -9,22 +9,22 @@ VERSION="v0.10" | |
DATE="2022-12-18" | ||
|
||
# Generate default options | ||
DEF_KEYSIZE=2048 | ||
DEF_DAYS=825 | ||
DEF_SIGN_SIGNATURE="sha256" | ||
# Subject default options | ||
DEF_COUNTRY= | ||
DEF_STATE= | ||
DEF_CITY= | ||
DEF_ORG= | ||
DEF_UNIT= | ||
DEF_CN= | ||
DEF_EMAIL= | ||
# DEF_KEYSIZE=2048 | ||
# DEF_DAYS=825 | ||
# DEF_SIGN_SIGNATURE="sha256" | ||
# # Subject default options | ||
# DEF_COUNTRY=MU | ||
# DEF_STATE=GP | ||
# DEF_CITY=Mahebourg | ||
# DEF_ORG=Tricky-Bit | ||
# DEF_UNIT=IT | ||
# DEF_CN=tricky-bit.int | ||
# DEF_EMAIL=[email protected] | ||
|
||
# v3 subject alt names | ||
DEF_ALT_NAME= | ||
DEF_ALT_IP_NAME= | ||
|
||
# DEF_ALT_NAME=trick-bit.int | ||
# DEF_ALT_IP_NAME= | ||
source ~/.local/bin/configs | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if this file does not exist? |
||
# Verbosity | ||
DEF_VERBOSE= | ||
|
||
|
This file contains hidden or 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,17 @@ | ||
# Generate default options | ||
DEF_KEYSIZE=4096 | ||
DEF_DAYS=3650 | ||
DEF_SIGN_SIGNATURE="sha256" | ||
# Subject default options | ||
DEF_COUNTRY=MU | ||
DEF_STATE=GP | ||
DEF_CITY=Mahebourg | ||
DEF_ORG=Tricky-bit | ||
DEF_UNIT=IT | ||
DEF_CN=tricky-bit.int | ||
[email protected] | ||
# v3 subject alt names | ||
DEF_ALT_NAME=trick-bit.int | ||
DEF_ALT_IP_NAME= | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a non-default location for binaries.
You should use: