22 lines
458 B
Bash
22 lines
458 B
Bash
|
#!/bin/bash
|
||
|
# 2023-12-13
|
||
|
|
||
|
clear
|
||
|
|
||
|
# Generate KEY
|
||
|
openssl genrsa -des3 -out server.protected.key 2048
|
||
|
|
||
|
# Generate CSR
|
||
|
openssl req -new -key server.protected.key -out server.csr
|
||
|
|
||
|
# Unprotect KEY
|
||
|
openssl rsa -in server.protected.key -out server.key
|
||
|
|
||
|
# Generate CRT
|
||
|
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
|
||
|
|
||
|
# Place certificates in place
|
||
|
copy ./server.crt ../datas/secret/keys/
|
||
|
copy ./server.key ../datas/secret/keys/
|
||
|
|
||
|
exit 0
|