博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助 

天堂あ飞翔

Things do not change; we change...
heavenflying.cublog.cn
关于作者  
     ^V^^V^^V^^V^^V^^V^
     LOVE MY GF FOREVER
     ^V^^V^^V^^V^^V^^V^

我的分类  




How to create a testing ca certificate

If you are interested in software developing about openssl, the best way to master it is coding. First of all is getting a ca (Certificate Authority) certificate. Following me step by step, you’ll create a ca certificate, the client and the site certificates.

 

1.       create a pair of the keys (the public key and the private key) with the following command

openssl genrsa –out testca.key –des3 –passout pass:123456 1024

2.       construct the request of the certificate with the command

openssl req -key testca.key -passin pass:123456 -new -out testca.req

3.       create the ca certificate signed by itself

openssl x509 -req -in testca.req -signkey testca.key -out testca.pem -passin pass:123456

 

In this way, you can create the ca certificate and it’s signed by itself. Yes, it become a fake root ca certificate. However, you can use it to sign other certificates to do the experiments about the openssl. You should create the server certificate and the client certificate after the creation of the root ca certificate. Follow the step 1 and step 2 to create the key pairs and the requests of the certificate and create the certificates with the following command.

openssl x509 -req -in mysite.req -CA testca.pem -CAkey testca.key -out mysite.pem -passin pass:123456  -CAcreateserial

 发表于: 2008-05-29,修改于: 2008-05-29 16:51
 已浏览196次,有评论0条
推荐 投诉

  网友评论

  发表评论



Copyright © 2001-2006 ChinaUnix.net All Rights Reserved

感谢所有关心和支持过ChinaUnix的朋友们
页面生成时间:4.68926

京ICP证041476号