当前位置:网站首页>Sign SSL certificate as Ca
Sign SSL certificate as Ca
2022-07-06 02:47:00 【uiop_ uiop_ uiop】
In order to solve ssl Problems with certificate signing . for example : Apply for free ssl There is no way to add certificates dns Parse entry ,vps No domain name filing , Make it impossible to complete the formal ssl Certificate issued .SSL Self signature is not reliable , Many browsers may also not recognize self signed certificates . In order to eradicate this problem directly , We act directly as CA, Use self signature CA Certificate to issue the required SSL certificate . I stepped on a lot of pits during this period , Finally finished .
ssl.conf
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
req_extensions = req_ext
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
countryName_default = GB
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = England
localityName = Locality Name (eg, city)
localityName_default = Brighton
organizationName = Organization Name (eg, company)
organizationName_default = Hallmarkdesign
organizationalUnitName = Organizational Unit Name (eg, section)
organizationalUnitName_default = IT
commonName = Common Name (e.g. server FQDN or YOUR name)
commonName_max = 64
commonName_default = 【SERVER_DOMAIN_NAME_WITH:PORT_NUMBER】
[ req_ext ]
subjectAltName = @alt_names
[alt_names]
IP.1 = 【YOUR_SERVER_PUBLIC_IP】
DNS.1 = 【SERVER_DNS_DOMAIN】
sign.conf
subjectAltName=IP:【SERVER_IP_ADDRESS】,DNS:【DNS_NAME】
Here are the specific commands .
cd ~
openssl rand -writerand .rnd
cd 【WORKING_DIRECTORY】
openssl genrsa -des3 -out rootCA.key 4096
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 99999 -out rootCA.crt
openssl genrsa -out server.key 2048
openssl req -new -sha256 -out server.csr -key server.key -config ssl.conf
openssl x509 -req -in server.csr -CA rootCA.crt -CAkey rootCA.key -CAcreateserial -out server.crt -days 99999 -sha256 -extfile sign.conf
The back end here is flask For example . The following configuration ssl Certificate and private key
ssl_context = ("server.crt", "server.key")
Then in order to complete the whole trust chain , take rootCA.crt Import as “ Trusted root certificate ” that will do . Android and Windows All the tests were successful , Painless access https Interface , no need 443 It is normal to replace the port with another port , in front 【SERVER_DOMAIN_NAME_WITH:PORT_NUMBER】 Just mark the port , for instance test.example.com:6666
design sketch :
You may encounter the situation that there is no record when you visit , But try restarting the back-end service program
边栏推荐
- 【Kubernetes 系列】一文學會Kubernetes Service安全的暴露應用
- 微服务间通信
- 米家、涂鸦、Hilink、智汀等生态哪家强?5大主流智能品牌分析
- Day 50 - install vsftpd on ceontos6.8
- DDoS attacks - are we really at war?
- Is there a case where sqlcdc monitors multiple tables and then associates them to sink to another table? All operations in MySQL
- 力扣今日題-729. 我的日程安排錶 I
- 【 kubernets series】 a Literature Study on the Safe exposure Applications of kubernets Service
- 【MySQL 15】Could not increase number of max_ open_ files to more than 10000 (request: 65535)
- Thinking on Architecture Design (under continuous updating)
猜你喜欢
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18
Installation and use tutorial of cobaltstrike-4.4-k8 modified version
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8
Looking at the trend of sequence modeling of recommended systems in 2022 from the top paper
Referenceerror: primordials is not defined error resolution
故障分析 | MySQL 耗尽主机内存一例分析
Yyds dry inventory comparison of several database storage engines
主数据管理理论与实践
Pure QT version of Chinese chess: realize two-man, man-machine and network games
Zero foundation self-study STM32 - Review 2 - encapsulating GPIO registers with structures
随机推荐
2345文件粉碎,文件强力删除工具无捆绑纯净提取版
Technology sharing | what if Undo is too big
2.13 simulation summary
Reset nodejs of the system
Crawler (9) - scrape framework (1) | scrape asynchronous web crawler framework
RobotFramework入门(二)appUI自动化之app启动
[postgraduate entrance examination English] prepare for 2023, learn list5 words
一个复制也能玩出花来
在GBase 8c数据库中使用自带工具检查健康状态时,需要注意什么?
SQL table name is passed as a parameter
Fault analysis | analysis of an example of MySQL running out of host memory
MySQL winter vacation self-study 2022 11 (9)
MySQL advanced notes
米家、涂鸦、Hilink、智汀等生态哪家强?5大主流智能品牌分析
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6
Bigder: I felt good about the 34/100 interview, but I didn't receive the admission
深度解析链动2+1模式,颠覆传统卖货思维?
Referenceerror: primordials is not defined error resolution
球面透镜与柱面透镜
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 14