first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

20
certificate/gencert.cmd Normal file
View File

@@ -0,0 +1,20 @@
del /q /s .\*.pfx
del /q /s .\*.crt
del /q /s .\*.key
del /q /s .\*.pem
del /q /s .\*.srl
del /q /s .\*.csr
openssl genrsa -out ca.key 2048
openssl req -x509 -new -nodes -key ca.key -sha256 -days 365000 -out ca.crt -subj "/CN=LocalCA"
openssl genrsa -out identityserver.key 2048
openssl req -new -key identityserver.key -out identityserver.csr -config san.cnf
openssl x509 -req -in identityserver.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out identityserver.crt -days 365000 -sha256 -extensions v3_req -extfile san.cnf
openssl pkcs12 -export -out robotnet.pfx -inkey identityserver.key -in identityserver.crt -certfile ca.crt -password pass:RobotNet@2024
openssl pkcs12 -in robotnet.pfx -out cert.pem -clcerts -nokeys -passin pass:RobotNet@2024
openssl pkcs12 -in robotnet.pfx -out key.pem -nocerts -nodes -passin pass:RobotNet@2024

23
certificate/gencert.sh Normal file
View File

@@ -0,0 +1,23 @@
#/bin/bash
rm -f ./*.pfx
rm -f ./*.crt
rm -f ./*.key
rm -f ./*.pem
rm -f ./*.srl
rm -f ./*.csr
#exit
openssl genrsa -out ca.key 2048
openssl req -x509 -new -nodes -key ca.key -sha256 -days 365000 -out ca.crt -subj "/CN=LocalCA"
openssl genrsa -out identityserver.key 2048
openssl req -new -key identityserver.key -out identityserver.csr -config san.cnf
openssl x509 -req -in identityserver.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out identityserver.crt -days 365000 -sha256 -extensions v3_req -extfile san.cnf
openssl pkcs12 -export -out robotnet.pfx -inkey identityserver.key -in identityserver.crt -certfile ca.crt -password pass:RobotNet@2024
openssl pkcs12 -in robotnet.pfx -out cert.pem -clcerts -nokeys -passin pass:RobotNet@2024
openssl pkcs12 -in robotnet.pfx -out key.pem -nocerts -nodes -passin pass:RobotNet@2024

10
certificate/san.cnf Normal file
View File

@@ -0,0 +1,10 @@
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
CN = identityserver
[v3_req]
subjectAltName = DNS:identityserver,DNS:mapmanager,DNS:mapdesigner,DNS:localhost,IP:172.20.235.2