How to create a self-signed SSL Certificate

使用自签证书将集群导入Rancher 通过以上步骤,您已成功使用自签证书将集群导入Rancher,并确保了通信的安全性。请记住,在将证书导入Rancher之前,您需要对私钥和证书文件的保密,并妥善管理它们的访问权限,以确保集群的安全性。在使用Rancher时,您可能希望使用自签证书来保护通信并确保集群的安全性。完成后,您将在证书列表中看到您上传的证书。然后,选择要导入证书的集群,点击右上角的"设置"按钮,并选择"证书"选项卡。使用浏览器时,只需在URL中输入Rancher的地址,然后您将看到浏览器显示为安全连接的指示。 阅读详情

Overview

The following is an extremely simplified view of how SSL is implemented and what part the certificate plays in the entire process.

Normal web traffic is sent unencrypted over the Internet. That is, anyone with access to the right tools can snoop all of that traffic. Obviously, this can lead to problems, especially where security and privacy is necessary, such as in credit card data and bank transactions. The Secure Socket Layer is used to encrypt the data stream between the web server and the web client (the browser).

SSL makes use of what is known as asymmetric cryptography, commonly referred to as public key cryptography (PKI). With public key cryptography, two keys are created, one public, one private. Anything encrypted with either key can only be decrypted with its corresponding key. Thus if a message or data stream were encrypted with the server’s private key, it can be decrypted only using its corresponding public key, ensuring that the data only could have come from the server.

If SSL utilizes public key cryptography to encrypt the data stream traveling over the Internet, why is a certificate necessary? The technical answer to that question is that a certificate is not really necessary - the data is secure and cannot easily be decrypted by a third party. However, certificates do serve a crucial role in the communication process. The certificate, signed by a trusted Certificate Authority (CA), ensures that the certificate holder is really who he claims to be. Without a trusted signed certificate, your data may be encrypted, however, the party you are communicating with may not be whom you think. Without certificates, impersonation attacks would be much more common.

Step 1: Generate a Private Key

The openssl toolkit is used to generate an RSA Private Key and CSR (Certificate Signing Request). It can also be used to generate self-signed certificates which can be used for testing purposes or internal usage.

The first step is to create your RSA Private Key. This key is a 1024 bit RSA key which is encrypted using Triple-DES and stored in a PEM format so that it is readable as ASCII text.

openssl genrsa -des3 -out server.key 1024

Generating RSA private key, 1024 bit long modulus
.........................................................++++++
........++++++
e is 65537 (0x10001)
Enter PEM pass phrase:
Verifying password - Enter PEM pass phrase:

Step 2: Generate a CSR (Certificate Signing Request)

Once the private key is generated a Certificate Signing Request can be generated. The CSR is then used in one of two ways. Ideally, the CSR will be sent to a Certificate Authority, such as Thawte or Verisign who will verify the identity of the requestor and issue a signed certificate. The second option is to self-sign the CSR, which will be demonstrated in the next section.

During the generation of the CSR, you will be prompted for several pieces of information. These are the X.509 attributes of the certificate. One of the prompts will be for “Common Name (e.g., YOUR name)”. It is important that this field be filled in with the fully qualified domain name of the server to be protected by SSL. If the website to be protected will be https://public.akadia.com, then enter public.akadia.com at this prompt. The command to generate the CSR is as follows:

openssl req -new -key server.key -out server.csr

Country Name (2 letter code) [GB]:CH
State or Province Name (full name) [Berkshire]:Bern
Locality Name (eg, city) [Newbury]:Oberdiessbach
Organization Name (eg, company) [My Company Ltd]:Akadia AG
Organizational Unit Name (eg, section) []:Information Technology
Common Name (eg, your name or your server's hostname) []:public.akadia.com
Email Address []:martin dot zahn at akadia dot ch
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:

Step 3: Remove Passphrase from Key

One unfortunate side-effect of the pass-phrased private key is that Apache will ask for the pass-phrase each time the web server is started. Obviously this is not necessarily convenient as someone will not always be around to type in the pass-phrase, such as after a reboot or crash. mod_ssl includes the ability to use an external program in place of the built-in pass-phrase dialog, however, this is not necessarily the most secure option either. It is possible to remove the Triple-DES encryption from the key, thereby no longer needing to type in a pass-phrase. If the private key is no longer encrypted, it is critical that this file only be readable by the root user! If your system is ever compromised and a third party obtains your unencrypted private key, the corresponding certificate will need to be revoked. With that being said, use the following command to remove the pass-phrase from the key:

cp server.key server.key.org
openssl rsa -in server.key.org -out server.key

The newly created server.key file has no more passphrase in it.

-rw-r--r-- 1 root root 745 Jun 29 12:19 server.csr
-rw-r--r-- 1 root root 891 Jun 29 13:22 server.key
-rw-r--r-- 1 root root 963 Jun 29 13:22 server.key.org

Step 4: Generating a Self-Signed Certificate

At this point you will need to generate a self-signed certificate because you either don’t plan on having your certificate signed by a CA, or you wish to test your new SSL implementation while the CA is signing your certificate. This temporary certificate will generate an error in the client browser to the effect that the signing certificate authority is unknown and not trusted.

To generate a temporary certificate which is good for 365 days, issue the following command:

openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Signature ok
subject=/C=CH/ST=Bern/L=Oberdiessbach/O=Akadia AG/OU=Information
Technology/CN=public.akadia.com/Email=martin dot zahn at akadia dot ch
Getting Private key

Step 5: Installing the Private Key and Certificate

When Apache with mod_ssl is installed, it creates several directories in the Apache config directory. The location of this directory will differ depending on how Apache was compiled.

cp server.crt /usr/local/apache/conf/ssl.crt
cp server.key /usr/local/apache/conf/ssl.key

Step 6: Configuring SSL Enabled Virtual Hosts

SSLEngine on
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
CustomLog logs/ssl_request_log \
   "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

Step 7: Restart Apache and Test

/etc/init.d/httpd stop
/etc/init.d/httpd stop

https://public.akadia.com

other

生成pem文件

openssl genrsa -des3 -out server.key 1024

 openssl req -x509 -new -nodes -key server.key -sha256 -days 1024 -out server.pem

配置trino时还需要把server.key内容追加到server.pem尾

参考:https://www.akadia.com/services/ssh_test_certificate.html

深入解析EDID中Display Descriptor Block的配置技巧与实战应用 本文深入解析EDID中Display Descriptor Block的配置技巧与实战应用。通过剖析像素时钟、有效像素、消隐区与同步脉冲等核心参数,并结合1280x720@60Hz的实战配置案例,指导开发者如何正确为定制硬件或非标准显示器编写“身份证”,避免黑屏、分辨率异常等问题,确保显示设备完美点亮。 阅读详情

相关推荐

【实战揭秘】高胜率集合竞价抓涨停策略:融合MACD背离与斐波那契的量化模型

本文揭秘了一种高胜率集合竞价抓涨停策略,融合MACD背离与斐波那契数列的量化模型。通过量能异动、技术形态突破和资金共识形成的交叉验证,该策略在实盘中表现出色。文章详细解析了MACD背离的量化实现细节、斐波那契数列的实战应用,以及策略的量化建模过程,帮助投资者提升交易胜率。

herb5的博客 1554

如何搭建自签名证书的https网站

ssl协议介绍,搭建https网站

qq_57146982的博客 2051

pytest-bdd封装

简介 pytestbdd主要是用于代码封装 代码封装的好处: 1、提升代码复用率 2、提示测试效率 手工测试–使用框架0代码 流程+数据驱动 产品经理这样的不懂测试的人员–流程驱动 自动化测试–数据驱动 pytest-bdd:流程驱动封装 行为驱动–敏捷开发模式,消除开发/测试对需要了解的歧义 使用方式: 描述需求/用户场景 Feature(需求) Scenario(场景) Given(假设) When(操作步骤) Then(验证,清除) #新建feature 文件之前 需要提取安装支持featrue文.

liao_11的博客 2733

ssl证书自动生成脚本_使用ssl-on-demand脚本管理SSL证书

ssl证书自动生成脚本竞争对手松懈 。 那样令人尴尬,将来肯定会发生在其他人身上。 在现代网络上,过期的证书可能会给网站造成严重的问题,从无法连接到网站的不满意用户到恶意利用更新证书失败行为的安全威胁。 按需Ssl是一组SSL脚本,可帮助网站所有者管理证书。 它用于按需证书生成和验证,并且可以创建证书签名请求( CSR )并预测现有证书的到期时间。 自动执行SSL到期检查 USAG...

cumo3681的博客 1132

ISCE2+MintPy环境搭建实战:用Anaconda五分钟搞定InSAR处理全家桶

本文提供了一份详细的ISCE2+MintPy环境安装教程,旨在帮助InSAR处理初学者快速搭建开发环境。通过使用Anaconda创建虚拟环境并配置国内镜像,用户可在五分钟内一键安装ISCE2和MintPy全家桶,有效解决依赖冲突和版本兼容性问题,让用户能专注于数据处理本身。

2y3u4i5o6p的博客 1003

告别纯文本RAG:用Dify 1.11.0多模态知识库,5步搭建一个能“读图”的智能客服助手

本文详细介绍了如何利用Dify 1.11.0多模态知识库构建智能视觉客服助手,通过5个步骤实现图片内容理解与专业回复。从准备多模态素材到配置知识库节点,再到设计工作流逻辑和性能优化,帮助开发者快速搭建高效客服系统,显著提升用户体验和问题解决效率。

weixin_30832143的博客 451

解决ubuntu apt-get install 问题:Certificate verification failed: The certificate is NOT trusted.

3、更新完证书后改回https【这步没有用,后面2步均正常】5、安装软件 sudo apt-get install bc。4、更新软件列表 sudo apt-get udpate。1、修改镜像源,将https改为http。

测试人的成长日志 1354

别再只调PID了!手把手教你从LC谐振到检波,搞定STM32智能车电磁循迹硬件电路

本文深入解析STM32智能车电磁循迹硬件电路设计,从LC谐振选频到数字信号处理,提供完整的信号链路设计要点与实战技巧。通过优化电磁杆布局和信号放大电路,显著提升赛道位置检测精度,误差可控制在±0.5cm以内,为智能车竞赛提供可靠硬件支持。

weixin_29220405的博客 263

How to create a self-signed SSL Certificate ...

      ... which can be used for testing purposes or internal usage (转载自http://www.akadia.com/services/ssh_test_certificate.html) Overview The following is an extremely simplified view of how SSL...

weixin_30273175的博客 197

海思Hi3559A/CV100 DDR4参数配置经验分享

海思Hi3559A/CV100 DDR4参数配置方法 Hi3559AV100 DDR4 驱动配置说明 1.1 Hi3559AV100 DDR4 CLK/AC 驱动配置方法 寄存器地址 DDR PHY0:0x1206d0bc DDR PHY1:0x1206f0bc 寄存器描述 − Bit[5:3]:CLK 驱动 − Bit[14:12]:2T 驱动 − Bit[20:18]:1T 驱动 驱动大小定义 − 000:Disable − 001:240ohm − 010: 120ohm − 011:80ohm −

WeChat_zhanggong345的博客 2878

【数字孪生与仿真技术】07:焊装生产线虚拟调试与PLC代码生成全流程实战:从数字孪生到智能优化

摘要:本文系统阐述焊装生产线虚拟调试与PLC代码自动化生成的完整技术体系,结合工业4.0背景下的智能制造需求,构建从离散事件仿真、机器人运动规划到PLC控制逻辑生成的全流程解决方案。通过MATLAB/Simulink平台实现焊装线物流仿真优化,采用遗传算法进行缓冲区容量配置,结合Stateflow状态机设计PLC控制逻辑,并利用PLC Coder生成西门子S7-1500兼容的ST代码。某车企焊装线应用案例显示,虚拟调试技术使调试周期缩短75%,OEE提升13.4%,年节约成本超$420万。

专注于人工智能、软件开发、工控自动化、工厂数字化及智能化等领域,希望和大家共同进步! 1829

How To Create a SSL Certificate on Apache for Ubuntu 14.04

这篇教程简单实用,配置出来默认就是tls1.2了,但是我翻墙不稳定,所以怕以后急用却翻不了墙,所以转载过来了,原文地址: https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-apache-for-ubuntu-14-04 Introduction TLS,

ECHOutopia的专栏 1063

基于Simulink的单级式光伏并网系统MPPT控制仿真

本文基于Simulink平台,详细介绍了单级式光伏并网系统的MPPT控制仿真实现。主要内容包括:1)阐述MPPT作为光伏系统"智能大脑"的核心作用;2)解析单级式系统架构及扰动观察法(P&O)算法原理;3)以10kW户用系统为例,分步骤演示建模过程,包括光伏阵列搭建、P&O控制器实现(含MATLAB代码)、并网控制设计等;4)通过仿真验证系统在光照突变下的动态响应性能,MPPT效率达98.3%。文章还提出了变步长P&O等优化方向,为光伏系统仿真与控制提供实用指导。

xiaoheshang_123的博客 111

How To Create an SSL Certificate on Apache for CentOS 7

原文: https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-apache-for-centos-7Introduction TLS, or "transport layer security", and its predecessor SSL, which stands for ...

weixin_33973609的博客 107

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

how to create an ssl certificate on nginx for ubuntu14.04

https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-nginx-for-ubuntu-14-04 How To Create an SSL Certificate on Nginx for Ubuntu 14.04 Introduction TLS

youqika的专栏 1210

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

How To Set Up a Private Docker Registry on Ubuntu 14.04

How To Set Up a Private Docker Registry on Ubuntu 14.04 (原文:https://www.digitalocean.com/community/tutorials/how-to-set-up-a-private-docker-registry-on-ubuntu-14-04 原文需要翻墙,而且很慢,所以这里转一下,前一片博文是我根据

Jeremy's Note 3383

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

How to Create a Self Signed Certificate in IIS 7& Chrome setting

Generate Your IIS SelfSigned Certificate 1.Click on the Start menu, go to AdministrativeTools, and click on Internet Information Services (IIS) Manager. 2. Click on the name of the ser

df4gg55的专栏 801

转:创建自签名证书(How to Create a Self Signed Certificate in IIS 7)

转:https://www.sslshopper.com/article-how-to-create-a-self-signed-certificate-in-iis-7.html SSL is an essential part of securing your IIS 7.0 site and creating a self-signed certificate in IIS 7 is ...

weixin_34233856的博客 405

PCIe配置空间与BAR空间详解:FPGA开发避坑指南

PCIe设备的配置空间和BAR空间是主机识别与驱动读写的基础。配置空间作为设备的身份与能力描述,通过ECAM机制实现高效访问;BAR空间则提供地址映射窗口,支持内存映射与DMA传输。理解其工作原理,能有效解决设备枚举失败、BAR分配异常、DMA传输错误等常见问题。在FPGA开发中,合理规划BAR大小与类型、正确实现配置空间字段,是确保高速数据采集、图像传输等应用稳定运行的关键。

weixin_34342207的博客 411

转自 https://www.digitalocean.com/community/articles/how-to-create-a-ssl-certificate-on-nginx-for-cent

How To Create a SSL Certificate on nginx for CentOS 6 TAGGED IN: NGINX, CENT OS About Self-Signed Certificates A SSL certificate is a way to encrypt a site's information and create a more s

userguanguan的专栏 2376

Creating Self-Signed SSL Certificates

http://weblogic-wonders.com/weblogic/2011/05/25/ssl-configuration-for-weblogic-server/ http://m-button.blogspot.sg/2008/11/how-to-configure-weblogic-to-use-ssl.html http://www.oracle-base.com/articl...

weixin_30662011的博客 86

创建 Android 上使用的自签名证书(Creating self-signed certificates for use on Android)

创建 Android 上使用的自签名证书(Creating self-signed certificates for use on Android)

太阳火神的美丽人生 2476

linux命令安装ssl证书

How to create a self-signed SSL Certificate  第一步:Generate a Private Key(生成私人密钥) linux命令:openssl genrsa -des3 -out server.key 1024 终端会弹出一下信息 Generating RSA private key, 1024 bit long modulus .....

fresh123456的专栏 9426

How to read .pem file to get private and public key

https://stackoverflow.com/questions/11787571/how-to-read-pem-file-to-get-private-and-public-key

jupiter_888的博客 134
上一篇: Java项目工具
下一篇: elasticsearch集群搭建
大怀特
博客等级 码龄6年 5787粉丝 133原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大怀特

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值