firefox3,使用Openssl0.9.8k+httpd2.2.11+firefox3....

文件:patch-mod-ssl-ecc-2.2.11.rar大小:2KB下载:下载
第一步,是编译Openssl。我使用的是刚发布的openssl0.9.8k,从www.openssl.org上可以下载到。
Debian:/home/test# tar zxvf openssl-0.9.8k.tar.gz
Debian:/home/test# cd openssl-0.9.8k
Debian:/home/test/openssl-0.9.8k# ./config --prefix=/home/test/output/openssl/
Debian:/home/test/openssl-0.9.8k# make && make install
第二步,给httpd打补丁,编译httpd。从httpd.apache.org上可以下载到最新的版本2.2.11。
不过,httpd默认是不支持ECC的,需要打patch。http://issues.apache.org/bugzilla/attachment.cgi?id=18657上有一个针对2.2.2的patch。patch只有两百多行,全部是针对mod_ssl修改。我手动把修改代码加到2.2.11版本的mod_ssl代码中,顺便给2.2.11做了个patch。
Debian:/home/test# tar jxvf httpd-2.2.11.tar.bz2
Debian:/home/test# patch -p0 < ./patch-mod-ssl-ecc-2.2.11.patch
Debian:/home/test/httpd-2.2.11# ./configure --prefix=/home/test/output/httpd/ --enable-ssl=shared --with-ssl=/home/test/output/openssl/
Debian:/home/test/httpd-2.2.11# make && make install
第三步,生成ECC证书。
Debian:/home/test# openssl ecparam -out EccCA.key -name prime256v1 -genkey
Debian:/home/test# openssl req -key EccCA.key -new -out EccCA.req
Debian:/home/test# openssl x509 -req -in EccCA.req -signkey EccCA.key -out EccCA.pem
Debian:/home/test# openssl ecparam -out EccSite.key -name prime256v1 -genkey
Debian:/home/test# openssl req -key EccSite.key -new -out EccSite.req
Debian:/home/test# openssl x509 -req -in EccSite.req -CA EccCA.pem -CAkey EccCA.key -out EccSite.pem -CAcreateserial
第四步,配置httpd。配置文件中需要加入以下几行:
SSLCertificateFile /home/test/EccSite.pem
SSLCertificateKeyFile /home/test/EccSite.key
SSLCACertificateFile /home/test/EccCA.pem
SSLProtocol -ALL +TLSv1
SSLCipherSuite ALL:ECCdraft
第五步,使用firefox进行测试。
其它说明:
可以在第三步时,生成几张用户证书,然后用openssl pkcs12命令生成p12格式证书文件,然后导入到firefox中。
生成证书时,ECC曲线选择的是prime256v1。之前有选过prime192v1,好像firefox不认,改了种曲线就好了。
生成站点证书或用户证书时,也可以用ECC根证书颁发RSA证书,测试一样能通过。
Tags:  firefox3

延伸阅读

最新评论

发表评论