Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2008248
  • 博文数量: 369
  • 博客积分: 10093
  • 博客等级: 上将
  • 技术积分: 4271
  • 用 户 组: 普通用户
  • 注册时间: 2005-03-21 00:59
文章分类

全部博文(369)

文章存档

2013年(1)

2011年(2)

2010年(10)

2009年(16)

2008年(33)

2007年(146)

2006年(160)

2005年(1)

分类: 网络与安全

2006-10-18 16:27:34

OpenSSL是SSL和TLS协议的开源实现版本,许可协议为GPL,加之她的健壮性和强大的功能使得它在开源项目中广为使用。我的中的https协议的支持也是通过调用OpenSSL的API实现的,虽然有的地方并不正确,存在潜在的bug,但是她能让我在很短的时间内添加上对https协议的支持,也确实显示了其API的易用性,我想这也是她广为流传的原因之一吧!
关于SSL的原理和OpenSSL的简明教程请参看文章后面的参考链接,我只介绍一下如何生成证书,因为下面的文章中都没有提到这点。
xiaosuo@gentux ~ $ /etc/ssl/misc/CA.pl -newcert
Generating a 1024 bit RSA private key
.++++++
...................++++++
writing new private key to 'newkey.pem'
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
-----
You 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 blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:CN
State or Province Name (full name) [Some-State]:China
Locality Name (eg, city) []:Tianjin
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Nankai
Organizational Unit Name (eg, section) []:huanyuan
Common Name (eg, YOUR name) []:xiaosuo
Email Address []:xiaosuo@gmail.com
Certificate is in newcert.pem, private key is in newkey.pem
CA.pl脚本在不同的系统上其存放的位置可能不同,如果找不到可以用系统自带的包管理工具列出openSSL在系统上安装的文件列表,然后grep CA.pl找到其确切位置。如果这些您都不会,那么就用命令
find / -name "CA.pl"
查找其下落!
参考链接:

http://www-128.ibm.com/developerworks/cn/linux/l-openssl.html
http://www-128.ibm.com/developerworks/cn/linux/l-openssl2.html
http://www-128.ibm.com/developerworks/linux/library/l-openssl3.html
阅读(1204) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~