快速业务通道

自签证书和申请颁发证书

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-04-24
做一个自签证证书过程 1 进入/etc/pki/CA/private 生成一个密钥文件 [root@station40 certs]# cd /etc/pki/CA/private/ [root@station40 private]# ls my.key [root@station40 private]# openssl genrsa 2048 >cakey.pem Generating RSA private key, 2048 bit long modulus ............................. ............................................................... e is 65537 (0x10001) [root@station40 private]# ls cakey.pem 2 开始自签 -days CA证书的自签发时的有效期限 拥有帝国一切,皆有可能。欢迎访问phome.net [root@station40 CA]# openssl req -new -x509 -key private/cakey.pem -out cacert.pem -days 2000 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) [GB]:CN State or Province Name (full name) [<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />Berkshire]:HN Locality Name (eg, city) [Newbury]:ZZ Organization Name (eg, company) [My Company Ltd]:ZZU Organizational Unit Name (eg, section) []:DA Common Name (eg, your name or your server''s hostname) []:stations.example.com Email Address []:root@stations.example.com 3 /etc/pki/tls/CA缺少 拥有帝国一切,皆有可能。欢迎访问phome.net3个文件,现在我们一次建立它们 [root@station40 CA]# mkdir newcerts [root@station40 CA]# touch ./{index.txt,serial} [root@station40 CA]# ll total 32 -rw-r--r-- 1 root root 1058 Feb 25 22:43 cacert.pem -rw-r--r-- 1 root root 0 Feb 25 22:59 index.txt drwxr-xr-x 2 root root 4096 Feb 25 22:58 newcerts drwx------ 2 root root 4096 Feb 25 22:32 private -rw-r--r-- 1 root root 0 Feb 25 22:59 serial 进入serial添加一个二位数字 [root@station40 CA]# 4.修改/etc/pki/tls/openssl.conf 文件, 拥有帝国一切,皆有可能。欢迎访问phome.net修改绝对路径,把【 CA default】的第一行 改为/etc/pki/CA [ CA_default ] <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> dir = /etc/pki/CA # Where everything is kept certs = $dir/certs # Where the issued certs are kept crl_dir = $dir/crl # Where the issued crl are kept database = $dir/index.txt # database index file. #unique_subject = no # Set to ''no'' to allow creation of 45,15-2 申请证书过程 拥有帝国一切,皆有可能。欢迎访问phome.net 1 生成一个密钥文件 [root@station40 text]# cd /etc/pki/tls/certs [root@station40 certs]# ls ca-bundle.crt make-dummy-cert Makefile [root@station40 certs]# openssl genrsa 2048 >my.key Generating RSA private key, 2048 bit long modulus

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号