当前位置:网站首页>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.confThe 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
边栏推荐
- Sword finger offer 30 Stack containing min function
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
- QT release exe software and modify exe application icon
- Master data management theory and Practice
- I changed the driver to 5.1.35, but it is still the same error. I can succeed even now, but I will report this every time I do an SQL operation
- Template_ Find the reverse pair of permutations_ Sort based on merge
- DDoS attacks - are we really at war?
- Communication between microservices
- Taobao focus map layout practice
- 主数据管理(MDM)的成熟度
猜你喜欢

主数据管理(MDM)的成熟度
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15](/img/72/0fe9cb032339d5f1ccf6f6c24edc57.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15

Zero basic self-study STM32 wildfire review of GPIO use absolute address to operate GPIO

Introduction to robotframework (II) app startup of appui automation

A copy can also produce flowers
![[Yu Yue education] basic reference materials of digital electronic technology of Xi'an University of Technology](/img/47/e895a75eb3af2aaeafc6ae76caafe4.jpg)
[Yu Yue education] basic reference materials of digital electronic technology of Xi'an University of Technology
![[untitled] a query SQL execution process in the database](/img/de/700ee20934fc2cd4a019f761148ef9.png)
[untitled] a query SQL execution process in the database

Introduction to robotframework (I) brief introduction and use

High number_ Vector algebra_ Unit vector_ Angle between vector and coordinate axis
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7](/img/44/1861f9016e959ed7c568721dd892db.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7
随机推荐
HDU_ p1237_ Simple calculator_ stack
How to improve the enthusiasm of consumers when the member points marketing system is operated?
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 19
How to read excel, PDF and JSON files in R language?
Elimination games
RobotFramework入门(二)appUI自动化之app启动
Advanced technology management - what is the physical, mental and mental strength of managers
【若依(ruoyi)】启用迷你导航栏
SQL table name is passed as a parameter
Taobao focus map layout practice
2345文件粉碎,文件强力删除工具无捆绑纯净提取版
Introduction to robotframework (III) Baidu search of webui automation
How to accurately identify master data?
Sword finger offer 30 Stack containing min function
[Digital IC manual tearing code] Verilog asynchronous reset synchronous release | topic | principle | design | simulation
Shell脚本更新存储过程到数据库
力扣今日题-729. 我的日程安排表 I
一个复制也能玩出花来
Universal crud interface
[matlab] access of variables and files