1) Create your own self-signed trusted certificate (ca.crt) and private key (ca.key). They will sign the server certificate and the client
Code:
openssl req -new -newkey rsa: 1024 -x509 -days 3650 -nodes -out ca.crt -keyout ca.key -subj / C = RU / ST = 52 / L = NN / O = AC-fond/OU = Certificate_Issuer / CN = 11.11.11.11/emailAddress = admin@123.ru -config "openssl.cnf"
2) Preparing configuration ca.config (See attached file)
3) Creating a private server key and request a server certificate
Code:
openssl req -new -newkey rsa: 1024 -nodes -keyout server.key -out server.csr -subj / C = RU / ST = 52 / L = NN / O = AC-fond/OU = Razrabotka / CN = 11.11.11.11/emailAddress = admin-serv@123.ru -config "openssl.cnf"
4) signing the request to the server certificate using сa.crt and obtain a server certificate
Code:
openssl ca -config ca.config -in server.csr -out server.crt-batch
5) Creating a private key and client request a client certificate
Code:
openssl req -new -newkey rsa: 1024 -nodes -keyout stellar.key -out stellar.csr -subj / C = RU / ST = 52 / L = NiNo / O = AC-fond/OU = Razrabotka / CN = 11.11. 11.11/emailAddress = abc@123.ru-config "openssl.cnf"
6) sign a request for a client certificate using сa.crt and obtain a client certificate
Code:
openssl ca-config ca.config-in stellar.csr-out stellar.crt-batch
7) Prepare a certificate for transmission to the user. To do this, execute the following command:
Code:
openssl pkcs12 -export -in stellar.crt -inkey stellar.key -certfile ca.crt -out stellar.p12 -passout pass:123
Bookmarks