当前位置:网站首页>redhat/openssl generates a self-signed ca certificate and uses it
redhat/openssl generates a self-signed ca certificate and uses it
2022-07-31 14:07:00 【Gur.】
One-click generation of self-signed ssl certificate and private key
./create_self_signed_cert.sh"/C=CN/ST=Guangdong/L=Guangzhou/O=xdevops/OU=xdevops/CN=gitlab.xdevops.cn"
Check OpenSSL
Check if openssl is installed
openssl version
Generally on CentOS7, openssl is already installed by default.
Generate self-signed SSL certificate and private key
Step 1: Generate a private key
# genra generate RSA private key# -des3 des3 algorithm# -out server.key Generated private key file name# 2048 Private key lengthopenssl genrsa -des3 -out server.pass.key 2048
Step 2: Remove the password from the private key
openssl rsa -in server.pass.key -out server.key
Step 3: Generate CSR (Certificate Signing Request)
# req Generate certificate signing request# -new new generation# -key private key file# -out Generated CSR file# -subj Parameters for generating CSR certificateopenssl req -new -key server.key -out server.csr -subj "/C=CN/ST=Guangdong/L=Guangzhou/O=xdevops/OU=xdevops/CN=gitlab.xdevops.cn"
Step 4: Generate a Self-Signed SSL Certificate
# -days certificate validity periodopenssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Edit the following configuration in the file and save:
# listen portListen 443 https# server domain nameServerName localhost# Server signing certificate fileSSLCertificateFile /data/ssl/server.crt# server key fileSSLCertificateKeyFile /data/ssl/server.key# CA certificate (two-way authentication)# SSLCACertificateFile /data/ssl/ca/ca.pem
边栏推荐
猜你喜欢
IDEA connects to MySQL database and uses data
Node version switching management using NVM
Analysis of the startup source code of hyperf (2) - how the request reaches the controller
技能大赛训练题:域用户和组织单元的创建
使用NVM进行node版本切换管理
尚硅谷-JVM-内存和垃圾回收篇(P1~P203)
Selenium自动化测试之Selenium IDE
小试牛刀:Go 反射帮我把 Excel 转成 Struct
爱可可AI前沿推介(7.31)
Motion capture system for end-positioning control of flexible manipulators
随机推荐
Detailed guide to compare two tables using natural full join in SQL
1小时直播招募令:行业大咖干货分享,企业报名开启丨量子位·视点
IDEA can't find the Database solution
Analysis of the startup source code of hyperf (2) - how the request reaches the controller
页面整屏滚动效果
How IDEA runs web programs
The latest complete code: Incremental training using the word2vec pre-training model (two loading methods corresponding to two saving methods) applicable to various versions of gensim
文本相似度计算(中英文)详解实战
ICML2022 | 面向自监督图表示学习的全粒度自语义传播
最新完整代码:使用word2vec预训练模型进行增量训练(两种保存方式对应的两种加载方式)适用gensim各种版本
Redis 】 【 publish and subscribe message
STM32的CAN过滤器
技能大赛训练题:交换机的远程管理
八大排序汇总及其稳定性
Selenium自动化测试之Selenium IDE
Tortoise speed by "template"
为什么要分库分表?
自制的数据库安全攻防题,相关靶机自己制作
为什么 wireguard-go 高尚而 boringtun 孬种
[QNX Hypervisor 2.2 User Manual]9.14 safety