ImageVerifierCode 换一换
格式:DOCX , 页数:5 ,大小:16.08KB ,
资源ID:6993035      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/6993035.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(CentOS下利用httpd openssl来实现网站的httpscentos.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

CentOS下利用httpd openssl来实现网站的httpscentos.docx

1、CentOS下利用httpd openssl来实现网站的httpscentosCentOS下利用httpd+openssl来实现网站的httpscentos 下面呢我们来讲一下具体步骤配置CA服务器=1.配置CA 172.16.1.2 生成CA自己的公钥 私钥 CA对自己进行证书自签名 (用脚本生成)rootCA # vim /etc/pki/tls/fdir = /etc/CA # Where everything is kept 第45行basicConstraints=CA:TRUE # 自签署的证书可以使用 第178行rootCA # vim /etc/pki/tls/misc/CAC

2、ATOP=/etc/CA #第42行rootCA # /etc/pki/tls/misc/CA -newcaCA certificate filename (or enter to create)Making CA certificate .Generating a 1024 bit RSA private key.+.+writing new private key to ././CA/private/./cakey.pem #私钥Enter PEM pass phrase:123456 #保护CA私钥Verifying - Enter PEM pass phrase:123456-You

3、are about to be asked to enter information that will be incorporated into your certificate request.What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankFor some fields there will be a default value,If you enter ., the fie

4、ld will be left blank.-Country Name (2 letter code) GB:CN #身份信息State or Province Name (full name) Berkshire:BEIJINGLocality Name (eg, city) Newbury:HDOrganization Name (eg, company) My Company Ltd:UPLOOKINGOrganizational Unit Name (eg, section) :ITCommon Name (eg, your name or your servers hostname)

5、 :CAEmail Address :CAPlease enter the following extra attributes to be sent with your certificate requestA challenge password :An optional company name :Using configuration from /etc/pki/tls/fEnter pass phrase for ././CA/private/./cakey.pem:123456 #使用私钥自签名Check that the request matches the signature

6、Signature okCertificate Details: Serial Number: 0 (0x0) Validity Not Before: Mar 5 01:40:50 2012 GMT Not After : Mar 5 01:40:50 2015 GMT Subject: countryName = CN stateOrProvinceName = BEIJING organizationName = UPLOOKING organizationalUnitName = IT commonName = CA emailAddress = CA X509v3 extension

7、s: X509v3 Basic Constraints: CA:TRUE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: 61:D5:3A:C7:5C:0F:66:FE:D5:EF:5D:A1:94:8F:FD:C2:E5:94:7D:D3 X509v3 Authority Key Identifier: keyid:61:D5:3A:C7:5C:0F:66:FE:D5:EF:5D:A1:94:8F:FD:C2:E5:94:7D:D3Certificate is to be certi

8、fied until Mar 5 01:40:50 2015 GMT (1095 days)Write out database with 1 new entriesData Base UpdatedrootCA # ls /etc/CA/private/cakey.pem #CA私钥rootCA # ls /etc/CA/cacert.pem #CA证书rootCA # ls /etc/CA/careq.pem #CA证书请求配置web服务器=web 生成自己的私钥rootwww # openssl genrsa -des3 -out /etc/httpd/conf.d/server.key

9、 #使用des3保护私钥Generating RSA private key, 512 bit long modulus.+.+e is 65537 (0x10001)Enter pass phrase for /etc/httpd/conf.d/server.key:123456Verifying - Enter pass phrase for /etc/httpd/conf.d/server.key:123456生成证书请求(使用身份标识公钥)rootwww # openssl req -new -key /etc/httpd/conf.d/server.key -out /tmp/ser

10、ver.csrEnter pass phrase for /etc/httpd/conf.d/server.key:123456You are about to be asked to enter information that will be incorporated into your certificaterequest. What you are about to enter is what is called a Distinguished Name or a DN.There are quite a few fields but you can leave some blankF

11、or some fields there will be a default value,If you enter ., the field will be left blank.-Country Name (2 letter code) GB:CN #这部分信息要与CA一致 !State or Province Name (full name) Berkshire:BEIJINGLocality Name (eg, city) Newbury:HDOrganization Name (eg, company) My Company Ltd:UPLOOKINGOrganizational Un

12、it Name (eg, section) :IT-Common Name (eg, your name or your servers hostname) :Email Address :Please enter the following extra attributes to be sent with your certificate requestA challenge password :An optional company name :将证书请求发送给CArootwww # scp /tmp/server.csr CA:/tmp/CA服务器对证书请求进行数字签名= rootCA

13、# openssl ca -keyfile /etc/CA/private/cakey.pem -cert /etc/CA/cacert.pem -in /tmp/server.csr -out /tmp/server.crt /etc/CA/private/cakey.pem (这是ca的私钥) /tmp/server.csr (httpserver的证书请求文件) /etc/CA/cacert.pem (ca的证书) /tmp/server.crt (生成的httpserver的证书的名字)Using configuration from /etc/pki/tls/fEnter pass

14、phrase for /etc/CA/private/cakey.pem:Check that the request matches the signatureSignature okCertificate Details: Serial Number: 1 (0x1) Validity Not Before: Mar 5 02:20:56 2012 GMT Not After : Mar 5 02:20:56 2013 GMT Subject: countryName = CN stateOrProvinceName = BEIJING organizationName = UPLOOKI

15、NG organizationalUnitName = IT commonName = emailAddress = X509v3 extensions: X509v3 Basic Constraints: CA:TRUE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: D0:6E:C7:7D:FC:BE:0D:62:CA:B9:A2:E0:2A:9A:27:32:39:0B:91:F8 X509v3 Authority Key Identifier: keyid:61:D5:3A:C

16、7:5C:0F:66:FE:D5:EF:5D:A1:94:8F:FD:C2:E5:94:7D:D3Certificate is to be certified until Mar 5 02:20:56 2013 GMT (365 days)Sign the certificate? y/n:y1 out of 1 certificate requests certified, commit? y/nyWrite out database with 1 new entriesData Base Updated将签名后的数字证书颁发给webrootCA # scp /tmp/server.crt

17、:/etc/httpd/conf.d/配置web支持ssl实现https=rootwww # yum install httpd mod_sslrootwww # vim /etc/httpd/conf.d/ssl.confSSLCertificateFile /etc/httpd/conf.d/server.crtSSLCertificateKeyFile /etc/httpd/conf.d/server.keyrootwww # netstat -tunpl | grep 443tcp 0 0 :443 :* LISTEN 2000/httpdClient下载CA证书并导入到浏览器,然后访问www服务器=client需要下载CA证书并导入浏览器,使用https访问web,浏览器验证web数字证书是否由CA颁发 打开firefox,编辑->首选项->高级-> 加密->查看证书->导入

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1