- 1、本文档共6页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
使用OpenSSL生成CA证书和签发用户证书
李志平
在这里我们使用OpenSSL自带的CA.pl来创建CA证书,使用它来签发用户
证书,这个文件放在/usr/ssl/misc/CA.pl(我们假设把OpenSSL安装在/usr下)。
创建文件夹ca,存放要生成的CA证书和用户证书
[root@localhost~]#mkdirca
[root@localhost~]#cdca
[root@localhostca]#
将/usr/ssl/misc/CA.pl和/usr/ssl/f拷贝到
当前目录ca中
[root@localhostca]#cp/usr/ssl/misc/CA.pl./
[root@localhostca]#cp/usr/ssl/f./
创建CA证书。
执行./CA.plnewca
需要填写如下:(红字部分是需要填写的,其中“按回车键”表示直接按回车键,有输入内容的,输入内容后再按回车键)
[root@localhostca]#./CA.pl-newca
CAcertificatefilename(orentertocreate)
(按回车键)
MakingCAcertificate...
Generatinga1024bitRSAprivatekey
++++++ ++++++
writingnewprivatekeyto./demoCA/private/cakey.pem
EnterPEMpassphrase:(输入密码,比如:1234)
Verifying-EnterPEMpassphrase(确认密码:1234)
Youareabouttobeaskedtoenterinformationthatwillbeincorporatedintoyourcertificaterequest.
WhatyouareabouttoenteriswhatiscalledaDistinguishedNameoraDN.TherearequiteafewfieldsbutyoucanleavesomeblankForsomefieldstherewillbeadefaultvalue,Ifyouenter.,thefieldwillbeleftblank.
CountryName(2lettercode)[AU]CN
StateorProvinceName(fullname)[Some-State]BJ
LocalityName(eg,city)[]:BJ
OrganizationName(eg,company)[InternetWidgitsPtyLtd]IBM
OrganizationalUnitName(eg,section)[]IBM
CommonName(eg,YOURname)[]:ben
EmailAddress[]:ben@
PleaseenterthefollowingextraattributestobesentwithyourcertificaterequestAchallengepassword[]:(按回车键)Anoptionalcompanyname[]:(按回车键)Usingconfigurationfrom/usr/ssl/fEnterpassphrasefor./demoCA/private/cakey.pem(输入刚才的密码:1234)CheckthattherequestmatchesthesignatureSignatureokCertificateDetails:
SerialNumber:
f9:53:35:b7:23:ff:c0:04Validity
NotBefore:Jun2313:50:442010GMT
NotAfter:Jun2213:50:442013GMT
Subject:
=CNcountryName
=CN
=BJ=IBM=IBM
=BJ
=IBM
=IBM
=ben
=ben@
X509v3extensions:
X509v3SubjectKeyIdentifier:
DD:F6:B8:17:6F:91:F6:33:BB:FB:8B:85:71:A4:70:47:E7:03:A5:0FX509v3Authorit
文档评论(0)