设为首页 收藏本站
查看: 776|回复: 0

[经验分享] apache ssl 证书申请

[复制链接]

尚未签到

发表于 2015-8-3 10:17:08 | 显示全部楼层 |阅读模式

SSL证书请求文件(CSR)生成指南 - Apache SSL / Apache ModSSL
  重要注意事项 An Important Note Before You Start
  在生成CSR文件时同时生成您的私钥,如果您丢了私钥或忘了私钥密码,则颁发证书给您后不能安装成功!您必须重新生成私钥和CSR文件,免费重新颁发新的证书。为了避免此情况的发生,请在生成CSR后一定要备份私钥文件和记住私钥密码,最好是在收到证书之前不要再动服务器。
By far the most common problem users have when going through this process is related to private keys. If you lose or cannot access a private key, you cannot use the certificate we issue to you and will need to request a free reissue. To ensure this never happens, we advise that a backup of the private key file is made and that a note is made of the password that is used to protect the export of the private key.
  “openssl”用于生成私钥和CSR,OpenSSL一般安装在/user/bin下,如果您的系统安装在其他目录,请指定正确的目录路径。
The utility "openssl" that you use to generate the private key and CSR comes with the OpenSSL toolkit and is usually installed under /usr/bin. If you have installed it elsewhere you will need to modify these instructions appropriately.
  以下所有命令假设您已经成功安装OpenSSL,将产生1024位的密钥,加密算法采用3DES,您必须使用您要申请SSL证书的域名来命名密钥文件。
The following sequence of commands will generate a 1024 bit key, encrypt it using the triple-DES cipher, and create a CSR based upon it (they assume that you have openssl in your path - if not then you should prefix the openssl command with the path to the binary). You should use the domain name that you are wishing to have certified as the core of the filenames. You should also make sure you do not overwrite existing keys and CSR's:
  1. 生成私钥 Generate the private key
  请使用以下命令来生成私钥 Please type the following command at the prompt:
  openssl genrsa -des3 -out www.mydomain.com.key 1024

  如上图所示,此命令将生成1024位的RSA私钥,私钥文件名为: www.mydomain.com.key,会提示您设定私钥密码,请设置密码,并牢记!
This command will generate a 1024 bit RSA private key and stores it in the file www.mydomain.com.key. It will ask you for a pass phrase: use something secure and remember it. Your certificate will be useless without it's corresponding key.
  2. 生成CSR文件 Generate the CSR
  请使用以下命令来生成CSR Please type the following command at the prompt:
  openssl req -new -key www.mydomain.com.key -out www.mydomain.com.csr
  如果提示“Unable to load config info from /usr/local/ssl/openssl.cnf ”,则加上一个指定openssl.cnf 路径的参数:
  openssl req -new -config openssl.cnf -key www.mydomain.com.key -out www.mydomain.com.csr

  此命令将提示您输入X.509证书所要求的字段信息,包括国家(中国添CN)、省份、所在城市、单位名称、单位部门名称(可以不填直接回车)。请注意: 除国家缩写必须填CN外,其余都可以是英文或中文。
This command will prompt you for the X.509 attributes of your certificate. Enter your country, state or province and locality or city. You should enter the company name as it appears on your official company registration documents. The organization unit is optional, we verify and authenticate the company name and not the organization unit. To skip the organization unit (OU) field please press enter on your keyboard.
  请输入您要申请SSL证书的域名,如果您需要为www.domain.com申请SSL证书就不能只输入domain.com。SSL证书是严格绑定域名的。
The term "Common Name" is X.509 speak for the name that distinguishes the certificate best, and ties it to your Organization. Enter your exact host and domain name that you wish to secure. Example: If you wish to secure www.mydomain.com, then you will need to enter the exact host (www) and domain name (mydomain.com) in this field. If you enter mydomain.com then the certificate issued to you will only work error free on https://mydomain.com. It will cause a certificate mismatch error when you or your users access the domain via https:// www.mydomain.com.
  请不要输入Email、口令(challenge password)和可选的公司名称,直接打回车即可。
Please do not enter your email address, challenge password or an optional company name when generating the CSR.
  您现在已经成功生成了密钥对,私钥文件:www.mydomain.com.key 保存在您的服务器中, 请把CSR文件:www.mydomain.com.csr 发给WoTrust/Thawte即可,CSR文件格式如下图所示。
You have now created a public/private key pair. The private key (www.mydomain.com.key) is stored locally on your machine and is used for decryption. The public portion is sent to thawte in the form of a Certificate Signing Request, and will be used by your users to encrypt the data they send to your site. The Certificate Signing Request (CSR) looks something like this:

  您也可以直接使用一个命令同时生成私钥和CSR文件:
  openssl req -new -nodes -keyout myserver.key -out myserver.csr



openssl req -new -config openssl.cnf -nodes -keyout myserver.key -out myserver.csr


  3. 备份私钥文件 Backup your private key
  请备份您的私钥文件并记下私钥密码。最好是把私钥文件备份到软盘或光盘中。
Please backup your keystore file and make a note of the password. A good choice is to create a copy of this file onto a diskette or other removeable media.
  4. 测试CSR和把CSR发给WoSign, Start the WoSign certificate request process
  生成CSR后,建议您自己测试一下生成的CSR文件是否正确,请点击 这里 测试您的CSR文件。请把测试成功的CSR文件发给WoSign即可。请一定不要再动您的服务器,等待证书的颁发。
To submit the CSR to WoSign for processing you should start the certificate enrollment process.

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-93586-1-1.html 上篇帖子: [zz]Apache Thrift学习小记 下篇帖子: Apache OFBiz 学习笔记 之 服务引擎 一
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表