For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
As configured in my dotfiles.
start new:
tmux
start new with session name:
| $ # Use Live CD to boot | |
| $ sudo su # Switch to root | |
| $ fdisk -l # Get names of root, boot & EFI partition names. you can also use blkid | |
| $ mount /dev/mapper/fedora_localhost--live-root /mnt # mount root partition | |
| $ cat /mnt/etc/fedora-release | |
| Fedora release 31 (Thirty One) | |
| $ mount /dev/nvme0n1p2 /mnt/boot # mount boot partition | |
| $ mount /dev/nvme0n1p1 /mnt/boot/efi # mount EFI partition | |
| # Note: If you are not able to mount EFI partition ('Input/Output error'), | |
| # You may have to repair ESP file system or format ESP. |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This tutorial will guide you step-by-step to creating a certificate authority using OpenSSL, with a three-tier structure (root, intermediate, application). All key materials are created with ECC.
The first step is to create the directory in which the CA will reside. As a simple example, we will work out of /root/ca. We will create a directory, /root/ca/db, to store the CA database flat files. Within this directory, three files must be created as follows:
touch /root/ca/db/index.txt
touch /root/ca/db/index.txt.attr
echo 100000 > /root/ca/db/serial
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: