first commit -push
This commit is contained in:
20
certificate/gencert.cmd
Normal file
20
certificate/gencert.cmd
Normal 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
23
certificate/gencert.sh
Normal 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
10
certificate/san.cnf
Normal 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
|
||||
Reference in New Issue
Block a user