Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nodeStudy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马旭烽
nodeStudy
Commits
963e4474
Commit
963e4474
authored
Jul 09, 2023
by
马旭烽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: ssl 创建脚本完善
parent
a6fa1356
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
strong.ps1
扩展脚本/SSL证书创建辅助脚本/strong.ps1
+33
-0
No files found.
扩展脚本/SSL证书创建辅助脚本/strong.ps1
0 → 100644
View file @
963e4474
# 设置本地环境变量
# 设置本地环境变量
Set-Variable
OPENSSL_CONFIG
"d:\Tool\OpenSSL-Win64\bin"
# mkdir ssl
Set-Location
./ssl
# Set-Location ./conf
# demo 自己起的名字
# openssl.exe genrsa -des3 -out demo.key 1024
# 文件 创建csr证书
# openssl.exe req -new -key demo.key -out demo.csr
# Copy-Item "demo.key" -Destination "demo.key.org"
# 生成 crt 证书
# openssl.exe x509 -req -days 365 -in demo.csr -signkey demo.key -out demo.crt
Remove-Item
./ssl
New-Item
./ssl
$Password
=
123456
# 生成服务端 key
openssl genrsa -des3 -out lingxi.server.key 2048
# 生成服务端证书
openssl req -x509 -new -nodes -key lingxi.server.key -sha256 -days 1024 -out lingxi.server.pem
# 客户端生成 csr 证书 和 key
openssl req -new -sha256 -nodes -out lingxidev.com.csr -newkey rsa:2048 -keyout lingxidev.com.key -subj
"/C=CN/ST=GD/L=GZ/O=LX/OU=Dev/CN=lingxidev.com/emailAddress=fireman34@lingxidev.com"
# 服务端客户端签名
openssl x509 -req -in lingxidev.com.csr -CA lingxi.server.pem -CAkey lingxi.server.key -CAcreateserial -out lingxidev.com.crt -days 500 -sha256 -extensions
"authorityKeyIdentifier=keyid,issuer\n basicConstraints=CA:FALSE\n keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment\n subjectAltName=DNS:*.lingxidev.com"
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment