Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1669047
  • 博文数量: 20
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 3272
  • 用 户 组: 普通用户
  • 注册时间: 2007-01-04 09:45
文章分类

全部博文(20)

文章存档

2011年(3)

2010年(1)

2009年(1)

2008年(15)

我的朋友

分类: 网络与安全

2008-05-29 16:51:21

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

阅读(1933) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~