Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

using both ca cert and certificate between server and client

#!/bin/bash

BOLD=$(tput bold)
CLEAR=$(tput sgr0)

echo -e "${BOLD}Generating RSA AES-256 Private Key for Root Certificate Authority${CLEAR}"
openssl genrsa -aes256 -out Root.CA.example.llc.key 4096

echo -e "${BOLD}Generating Certificate for Root Certificate Authority${CLEAR}"
openssl req -x509 -new -nodes -key Root.CA.example.llc.key -sha256 -days 1825 -out Root.CA.example.llc.pem

echo -e "${BOLD}Generating RSA Private Key for Server Certificate${CLEAR}"
openssl genrsa -out server/example.llc.server.key 4096

echo -e "${BOLD}Generating Certificate Signing Request for Server Certificate${CLEAR}"
openssl req -new -key server/example.llc.server.key -out server/example.llc.server.csr

echo -e "${BOLD}Generating Certificate for Server Certificate${CLEAR}"
openssl x509 -req -in server/example.llc.server.csr -CA Root.CA.example.llc.pem -CAkey Root.CA.example.llc.key -CAcreateserial -out server/example.llc.server.crt -days 1825 -sha256 -extfile server/example.llc.server.ext

echo -e "${BOLD}Generating RSA Private Key for Client Certificate${CLEAR}"
openssl genrsa -out client/example.llc.client.key 4096

echo -e "${BOLD}Generating Certificate Signing Request for Client Certificate${CLEAR}"
openssl req -new -key client/example.llc.client.key -out client/example.llc.client.csr

echo -e "${BOLD}Generating Certificate for Client Certificate${CLEAR}"
openssl x509 -req -in client/example.llc.client.csr -CA Root.CA.example.llc.pem -CAkey Root.CA.example.llc.key -CAcreateserial -out client/example.llc.client.crt -days 1825 -sha256

echo "Done!"
Comment

PREVIOUS NEXT
Code Example
Shell :: powershell check end of string 
Shell :: lightweight tag git 
Shell :: como veo lo que he cambiado en git 
Shell :: sudo apt upgrade nao actualiza 
Shell :: death stranding crack password 
Shell :: docker-containers-noroutetohostexception-host-is-unreachable 
Shell :: go2shell settings 
Shell :: ssh welcome message ubuntu 
Shell :: how to clear django shell 
Shell :: declare dataset in powershell 
Shell :: awk split a csv file based on column value 
Shell :: overwrite a file name character in linux 
Shell :: change data type powershell 
Shell :: pup command example 
Shell :: show directories before deleting them find unix 
Shell :: file not being exlcuded even in gitignore 
Shell :: louisiana muskrat bounty 
Shell :: bash 
Shell :: Installing Linux dedicated server for 7 days to die 
Shell :: shell redirect otpt to multiple files 
Shell :: dashed filename 
Shell :: emerald theme manager ubuntu 18.04 
Shell :: enable ssh 
Shell :: slidev 
Shell :: How can I become the owner of a file/folder that root owns? 
Shell :: linix and 
Shell :: yes/no 
Shell :: docker image layer storage windows 
Shell :: install mongodb mac stack overflow 
Shell :: shell Edited By King Deface 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =